natsserver

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatsPublisher

type NatsPublisher interface {
	Publish(subject string, v interface{}) error
}

type NatsServer

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

func New

func New(opts *server.Options, logger *log.Logger) *NatsServer

func (*NatsServer) MessageLogger

func (n *NatsServer) MessageLogger(msg *nats.Msg)

func (*NatsServer) Publish

func (n *NatsServer) Publish(subject string, v interface{}) error

func (*NatsServer) Shutdown

func (n *NatsServer) Shutdown()

func (*NatsServer) Start

func (n *NatsServer) Start(ctx context.Context) error

func (*NatsServer) Subscribe

func (n *NatsServer) Subscribe(subject string, cb nats.Handler) (*nats.Subscription, error)

Jump to

Keyboard shortcuts

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