Documentation ¶
Index ¶
- Variables
- func AsLambdaFallback(next lambda.Handler, sender canyon.WorkerSender) lambda.Handler
- func AsServer(next http.Handler, sender canyon.WorkerSender) http.Handler
- func AsWebsocket(next http.Handler, reqCtx events.APIGatewayWebsocketProxyRequestContext, ...) http.Handler
- func AsWorker(next http.Handler) http.Handler
- type Runner
Constants ¶
This section is empty.
Variables ¶
View Source
var DummySQSMessage = events.SQSMessage{ MessageId: "00000000-0000-0000-0000-000000000000", ReceiptHandle: "00000000/0000000000=", Body: "{}", Attributes: map[string]string{ "ApproximateReceiveCount": "1", "SentTimestamp": "0", "SenderId": "000000000000", "ApproximateFirstReceiveTimestamp": "0", }, MessageAttributes: map[string]events.SQSMessageAttribute{ "Value": { StringValue: aws.String("1"), DataType: "Number", }, }, EventSourceARN: "arn:aws:sqs:ap-northeast-1:123456789012:canyon-test", EventSource: "aws:sqs", AWSRegion: "ap-northeast-1", }
DummySQSMessage is a dummy sqs message for testing.
Functions ¶
func AsLambdaFallback ¶ added in v0.4.0
AsLambdaFallback returns lambda.Handler that embeds logger and sqs message sender in context.
func AsWebsocket ¶ added in v0.7.0
func AsWebsocket(next http.Handler, reqCtx events.APIGatewayWebsocketProxyRequestContext, sender canyon.WorkerSender) http.Handler
AsWebsocket returns http.Handler that embeds logger and sqs message sender in context.
Types ¶
type Runner ¶
type Runner struct { URL string // base URL of form http://ipaddr:port with no trailing slash Listener net.Listener Stdin io.WriteCloser // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.