embeddednats

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 6 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

func WithDirectory

func WithDirectory(dir string) Option

func WithLogging added in v0.5.3

func WithLogging(trace bool, debug bool) Option

func WithNATSServerOptions

func WithNATSServerOptions(natsServerOptions *server.Options) Option

func WithShouldClearData

func WithShouldClearData(shouldClearData bool) Option

type Server

type Server struct {
	NatsServer *server.Server
}

func New

func New(ctx context.Context, opts ...Option) (*Server, error)

New creates a new embedded NATS server. Will automatically start the server and clean up when the context is cancelled.

func (*Server) Client

func (n *Server) Client() (*nats.Conn, error)

func (*Server) Close

func (n *Server) Close() error

func (*Server) WaitForServer

func (n *Server) WaitForServer()

Directories

Path Synopsis
cmd
examples command

Jump to

Keyboard shortcuts

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