Documentation
¶
Index ¶
- Constants
- func Must[T any](v T, err error) T
- 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 EmitterBuilder
- type EndpointBuilder
- type Gateway
- type ListenerBuilder
- type Sink
- type SinkProps
- type WebSocketApiProps
Constants ¶
View Source
const ( // Environment variable defines event category (the route function is bound with) EnvConfigEventCategory = "CONFIG_SWARM_WS_EVENT_CATEGORY" // Environment variable defines URL to WebSocket API Gateway EnvConfigSourceWebSocketUrl = "CONFIG_SWARM_SOURCE_WS" )
View Source
const Version = "broker/websocket/v0.23.0"
Variables ¶
This section is empty.
Functions ¶
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{}
type EmitterBuilder ¶ added in v0.23.0
type EmitterBuilder struct {
// contains filtered or unexported fields
}
func Emitter ¶ added in v0.23.0
func Emitter() *EmitterBuilder
func (*EmitterBuilder) Build ¶ added in v0.23.0
func (b *EmitterBuilder) Build(endpoint string) (*kernel.EmitterCore, error)
func (EmitterBuilder) WithKernel ¶ added in v0.23.0
WithKernel configures swarm kernel options for advanced usage.
func (EmitterBuilder) WithService ¶ added in v0.23.0
func (b EmitterBuilder) WithService(service Gateway) T
WithService configures AWS API Gateway Management API client instance
type EndpointBuilder ¶ added in v0.23.0
type EndpointBuilder struct {
// contains filtered or unexported fields
}
func Endpoint ¶ added in v0.23.0
func Endpoint() *EndpointBuilder
func (*EndpointBuilder) Build ¶ added in v0.23.0
func (b *EndpointBuilder) Build(endpoint string) (*kernel.Kernel, error)
func (EndpointBuilder) WithKernel ¶ added in v0.23.0
WithKernel configures swarm kernel options for advanced usage.
func (EndpointBuilder) WithService ¶ added in v0.23.0
func (b EndpointBuilder) WithService(service Gateway) T
WithService configures AWS API Gateway Management API client instance
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 ListenerBuilder ¶ added in v0.23.0
type ListenerBuilder struct {
// contains filtered or unexported fields
}
func Listener ¶ added in v0.23.0
func Listener() *ListenerBuilder
func (*ListenerBuilder) Build ¶ added in v0.23.0
func (b *ListenerBuilder) Build() (*kernel.ListenerCore, error)
func (ListenerBuilder) WithKernel ¶ added in v0.23.0
WithKernel configures swarm kernel options for advanced usage.
func (ListenerBuilder) WithService ¶ added in v0.23.0
func (b ListenerBuilder) WithService(service Gateway) T
WithService configures AWS API Gateway Management API client instance
type SinkProps ¶
type SinkProps struct {
// Category of event to process. It is used to create a WebSocket route.
Category string
// Properties of Lambda function to handle the category
Function scud.FunctionProps
// WebSocket Api Gateway lambda is bound with
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.