websocket

package module
v0.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Version = "broker/websocket/v0.16.0"
View Source
const WSRequest = WSContext("WS.Request")

Variables

This section is empty.

Functions

func New

func New(endpoint string, opts ...swarm.Option) (swarm.Broker, error)

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 NewWebSocket

func NewWebSocket(endpoint string, opts ...swarm.Option) (*Client, error)

func (*Client) Enq

func (cli *Client) Enq(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 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 WSContext

type WSContext string

type WebSocketApiProps

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

Directories

Path Synopsis
examples
dequeue 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