nats

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNats

func NewNats(log logger.Logger, name string, hosts string, credentials gnats.Option, opts ...gnats.Option) (*gnats.Conn, error)

NewNats will return a new nats connections

Types

type ExactlyOnceHandler added in v0.0.3

type ExactlyOnceHandler func(payload []byte, msgid string) error

type ExactlyOnceSubscriber added in v0.0.3

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

func NewExactlyOnceConsumer added in v0.0.3

func NewExactlyOnceConsumer(logger logger.Logger, js nats.JetStreamContext, stream string, durable string, description string, subject string, handler ExactlyOnceHandler) (*ExactlyOnceSubscriber, error)

NewExactlyOnceConsumer will create (or reuse) an exactly once durable consumer

func (*ExactlyOnceSubscriber) Close added in v0.0.3

func (s *ExactlyOnceSubscriber) Close()

Close will shutdown subscriptions and wait for the subscriber to be shutdown

Jump to

Keyboard shortcuts

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