Documentation
¶
Index ¶
- Constants
- Variables
- func New(endpoint string, opts ...Option) (*kernel.Kernel, error)
- func NewDequeuer(opt ...Option) (*kernel.Dequeuer, error)
- func NewEnqueuer(endpoint string, opts ...Option) (*kernel.Enqueuer, error)
- func PrincipalOf[T any](msg swarm.Msg[T]) (string, error)
- type AuthorizerApiKeyProps
- type AuthorizerJwtProps
- type AuthorizerUniversalProps
- type Broker
- func (broker *Broker) NewAuthorizerApiKey(props *AuthorizerApiKeyProps) awsapigatewayv2.IWebSocketRouteAuthorizer
- func (broker *Broker) NewAuthorizerJwt(props *AuthorizerJwtProps) awsapigatewayv2.IWebSocketRouteAuthorizer
- func (broker *Broker) NewAuthorizerUniversal(props *AuthorizerUniversalProps) awsapigatewayv2.IWebSocketRouteAuthorizer
- func (broker *Broker) NewGateway(props *WebSocketApiProps) awsapigatewayv2.WebSocketApi
- func (broker *Broker) NewSink(props *SinkProps) *Sink
- type BrokerProps
- type Client
- type Gateway
- type Option
- type Sink
- type SinkProps
- type WebSocketApiProps
Constants ¶
View Source
const EnvConfigEventType = "CONFIG_SWARM_WS_EVENT_TYPE"
Environment variable to config event source
View Source
const EnvConfigSourceWebSocket = "CONFIG_SWARM_WS_URL"
View Source
const Version = "broker/websocket/v0.21.0"
Variables ¶
View Source
var ( // Passes AWS SQS client instance to broker WithService = opts.ForType[Client, Gateway]() )
Functions ¶
func NewDequeuer ¶ added in v0.20.0
Creates dequeue routine from WebSocket (AWS API Gateway)
func NewEnqueuer ¶ added in v0.20.0
Create enqueue routine to WebSocket (AWS API Gateway)
Types ¶
type AuthorizerApiKeyProps ¶
type AuthorizerJwtProps ¶
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
type BrokerProps ¶
type BrokerProps struct {
System string
}
type Gateway ¶
type Gateway interface {
PostToConnection(ctx context.Context, params *apigatewaymanagementapi.PostToConnectionInput, optFns ...func(*apigatewaymanagementapi.Options)) (*apigatewaymanagementapi.PostToConnectionOutput, error)
}
WebSocket declares the subset of interface from AWS SDK used by the lib.
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
|
Click to show internal directories.
Click to hide internal directories.