Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelperModule ¶
HelperModule returns fx module for initialization of helper to start NATS client for handlers.
The module is only loaded once.
func QueueValue ¶
func QueueValue() string
QueueValue returns the queue from the configuration via "faas.nats.queue" key.
func SubjectsValue ¶
func SubjectsValue() []string
SubjectValue returns the subjects from the configuration via "faas.nats.subjects" key.
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper assists in creating event handlers.
func NewDefaultHelper ¶
func NewDefaultHelper(ctx context.Context, conn *nats.Conn, handler *cloudevents.HandlerWrapper) *Helper
NewDefaultHelper returns a new Helper with default options.
func NewHelper ¶
func NewHelper(ctx context.Context, conn *nats.Conn, options *Options, handler *cloudevents.HandlerWrapper) *Helper
NewHelper returns a new Helper with options.
type Options ¶
Options can be used to create customized handler.
func DefaultOptions ¶
DefaultOptions returns options based in config.
type SubscriberListener ¶
type SubscriberListener struct {
// contains filtered or unexported fields
}
SubscriberListener represents a subscriber listener.
func NewSubscriberListener ¶
func NewSubscriberListener(q *nats.Conn, handler *cloudevents.HandlerWrapper, subject string, queue string) *SubscriberListener
NewSubscriberListener returns a subscriber listener.
Click to show internal directories.
Click to hide internal directories.