websocket

package module
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "broker/websocket/v0.20.0"

Variables

This section is empty.

Functions

func New

func New(endpoint string, opts ...Option) (*kernel.Kernel, error)

Create enqueue & dequeue routines to WebSocket (AWS API Gateway)

func NewDequeuer added in v0.20.0

func NewDequeuer(opts ...Option) (*kernel.Dequeuer, error)

Creates dequeue routine from WebSocket (AWS API Gateway)

func NewEnqueuer added in v0.20.0

func NewEnqueuer(endpoint string, opts ...Option) (*kernel.Enqueuer, error)

Create enqueue routine to WebSocket (AWS API Gateway)

Types

type AuthorizerApiKeyProps

type AuthorizerApiKeyProps struct {
	Access string
	Secret string
}

type AuthorizerJwtProps

type AuthorizerJwtProps struct {
	Issuer   string
	Audience string
}

type AuthorizerUniversalProps

type AuthorizerUniversalProps struct {
	AuthorizerApiKey *AuthorizerApiKeyProps
	AuthorizerJwt    *AuthorizerJwtProps
}

type Broker

type Broker struct {
	constructs.Construct
	Gateway    awsapigatewayv2.WebSocketApi
	Authorizer awsapigatewayv2.IWebSocketRouteAuthorizer
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker(scope constructs.Construct, id *string, props *BrokerProps) *Broker

func (*Broker) NewAuthorizerApiKey

func (broker *Broker) NewAuthorizerApiKey(props *AuthorizerApiKeyProps) awsapigatewayv2.IWebSocketRouteAuthorizer

func (*Broker) NewAuthorizerJwt

func (broker *Broker) NewAuthorizerJwt(props *AuthorizerJwtProps) awsapigatewayv2.IWebSocketRouteAuthorizer

func (*Broker) NewAuthorizerUniversal

func (broker *Broker) NewAuthorizerUniversal(props *AuthorizerUniversalProps) awsapigatewayv2.IWebSocketRouteAuthorizer

func (*Broker) NewGateway

func (broker *Broker) NewGateway(props *WebSocketApiProps) awsapigatewayv2.WebSocketApi

func (*Broker) NewSink

func (broker *Broker) NewSink(props *SinkProps) *Sink

type BrokerProps

type BrokerProps struct {
	System string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Enq

func (cli *Client) Enq(ctx context.Context, bag swarm.Bag) error

Enq enqueues message to broker

type Gateway

WebSocket declares the subset of interface from AWS SDK used by the lib.

type Option added in v0.20.0

type Option func(*Client)

func WithConfig added in v0.20.0

func WithConfig(opts ...swarm.Option) Option

func WithService added in v0.20.0

func WithService(service Gateway) Option

type Sink

type Sink struct {
	constructs.Construct
	Handler awslambda.IFunction
}

func NewSink

func NewSink(scope constructs.Construct, id *string, props *SinkProps) *Sink

type SinkProps

type SinkProps struct {
	Route    string
	Function scud.FunctionProps
	Gateway  awsapigatewayv2.WebSocketApi
}

type WebSocketApiProps

type WebSocketApiProps struct {
	*awsapigatewayv2.WebSocketApiProps
	Throttle *awsapigatewayv2.ThrottleSettings
	Host     *string
	TlsArn   *string
}

Directories

Path Synopsis
examples
dequeue/typed command
serverless command
lambda
auth command
connector command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL