nats

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelperModule

func HelperModule(extraOptions fx.Option) fx.Option

func QueueValue

func QueueValue() string

func SubjectsValue

func SubjectsValue() []string

Types

type Helper

type Helper struct {
	// contains filtered or unexported fields
}

func NewDefaultHelper

func NewDefaultHelper(ctx context.Context, subscriber *nats.Subscriber, handler *cloudevents.HandlerWrapper) *Helper

func NewHelper

func NewHelper(ctx context.Context, subscriber *nats.Subscriber, options *Options,
	handler *cloudevents.HandlerWrapper) *Helper

func (*Helper) Start

func (h *Helper) Start()

type Options

type Options struct {
	Subjects []string
	Queue    string
}

func DefaultOptions

func DefaultOptions() (*Options, error)

type SubscriberListener

type SubscriberListener struct {
	// contains filtered or unexported fields
}

func NewSubscriberListener

func NewSubscriberListener(q *nats.Subscriber, handler *cloudevents.HandlerWrapper, subject string,
	queue string) *SubscriberListener

func (*SubscriberListener) Subscribe

func (l *SubscriberListener) Subscribe(ctx context.Context) (*n.Subscription, error)

Jump to

Keyboard shortcuts

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