Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
Handle(context.Context, notification.ExecutionMessage)
}
type Listener ¶
type Listener interface { Subscribe(context.Context, string) error SetLogLevel(zerolog.Level) SetLogger(zerolog.Logger) }
func NewMqttListener ¶
func NewMqttListener(addr string, hdl Handler, opts ...ListenerOption) (Listener, error)
func NewSnsListener ¶
func NewSnsListener(client *sns.Client, hdl Handler, opts ...ListenerOption) Listener
A listener the listens for SNS messages via public endpoint Not currently used cause I dont really like this approach. Maybe be fine to require this to poll messages from an SQS queue instead and register SQS as the reciever of SNS messages to avoid having to run another public endpoint.
type ListenerOption ¶
type ListenerOption func(Listener)
func WithLogLevel ¶
func WithLogLevel(level zerolog.Level) ListenerOption
func WithLogger ¶
func WithLogger(logger zerolog.Logger) ListenerOption
Click to show internal directories.
Click to hide internal directories.