listener

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

Jump to

Keyboard shortcuts

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