View lambda_test.go
package main | |
import ( | |
"testing" | |
"github.com/stretchr/testify/assert" | |
) | |
type V func(v V) V |
View waitForJob.ts
import * as pulumi from "@pulumi/pulumi"; | |
import * as k8s from "@pulumi/kubernetes"; | |
import * as k8sOutput from "@pulumi/kubernetes/types/output"; | |
import * as k8sapi from 'kubernetes-client'; | |
const job = new k8s.batch.v1.Job("job", { | |
spec: { | |
template: { | |
spec: { | |
containers: [{ |
View index.ts
import * as splunk from "./splunk" | |
async function getSecretValue(): Promise<string> { | |
return "abcd" | |
} | |
getSecretValue().then(secret => { | |
splunk.setAuth(secret); | |
new splunk.SavedSearch("foo", {}); | |
}); |
View index.ts
import * as pulumi from "@pulumi/pulumi"; | |
import * as aws from "@pulumi/aws"; | |
import * as awsx from "@pulumi/awsx"; | |
import * as random from "@pulumi/random"; | |
// Construct a VPC | |
const vpc = new awsx.ec2.Vpc("vpc"); | |
// Create an Aurora Serverless MySQL database | |
const dbsubnet = new aws.rds.SubnetGroup("dbsubnet", { |
View managedkubernetes.ts
import * as awsx from "@pulumi/awsx"; | |
import * as eks from "@pulumi/eks"; | |
import * as k8s from "@pulumi/kubernetes"; | |
// Create an AWS VPC and EKS cluster | |
const vpc = new awsx.Vpc("vpc", { usePrivateSubnets: false }); | |
const cluster = new eks.Cluster("cluster", { | |
vpcId: vpc.vpcId, | |
subnetIds: vpc.subnetIds, | |
}); |
View apigatewaydomain.ts
import * as pulumi from "@pulumi/pulumi"; | |
import * as aws from "@pulumi/aws"; | |
// The services we want to host on our domain... | |
const api1 = new aws.apigateway.x.API("api1", { | |
routes: [ | |
{method: "GET", path: "/", eventHandler: async(ev) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({hello: "world"}), |
View thumbnailer.js
const cloud = require("@pulumi/cloud-aws"); | |
const aws = require("@pulumi/aws"); | |
// A bucket to store videos and thumbnails. | |
const bucket = new cloud.Bucket("bucket"); | |
const bucketName = bucket.bucket.id; | |
// A task which runs a containerized FFMPEG job to extract a thumbnail image. | |
const ffmpegThumbnailTask = new cloud.Task("ffmpegThumbTask", { | |
build: "./docker-ffmpeg-thumb", |
View helloworld.js
const cloud = require("@pulumi/cloud-aws"); | |
const endpoint = new cloud.API("hello"); | |
endpoint.static("/", "www"); | |
endpoint.get("/source", (req, res) => res.json({name: "AWS"})); | |
exports.url = endpoint.publish().url; |
View expression.str
interface IHashtable | |
{ | |
double lookup(string i); | |
void set(string i, double d); | |
} | |
class Hashtable() | |
{ | |
var o = {}; |
View ClosureCompiler.svc.cs
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.Serialization; | |
using System.ServiceModel; | |
using System.Text; | |
using System.ServiceModel.Activation; | |
using System.Net; | |
using System.IO; | |
using System.Web; |
NewerOlder