nats_jetstream_server

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost                = "0.0.0.0"
	DefaultPort                = 4222
	DefaultHTTPPort            = 8222
	DefaultClusterPort         = 6222
	DefaultJetStreamEnabled    = true
	DefaultJetStreamMaxMemory  = 1024 * 1024 * 1024      // 1GB
	DefaultJetStreamMaxStorage = 10 * 1024 * 1024 * 1024 // 10GB
	DefaultMaxConnections      = 64 * 1024
	DefaultMaxPayload          = 1024 * 1024 // 1MB
	DefaultWriteDeadline       = "2s"
	DefaultStoreDir            = "./data/jetstream"
	DefaultLogLevel            = "INFO"
)

Variables

This section is empty.

Functions

func Module

func Module(scope string) fx.Option

Types

type NATSJetStreamServer

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

func (*NATSJetStreamServer) GetClientURL

func (s *NATSJetStreamServer) GetClientURL() string

GetClientURL returns the client connection URL

func (*NATSJetStreamServer) GetConnectionCount

func (s *NATSJetStreamServer) GetConnectionCount() int

GetConnectionCount returns the current number of connections

func (*NATSJetStreamServer) GetHTTPURL

func (s *NATSJetStreamServer) GetHTTPURL() string

GetHTTPURL returns the HTTP monitoring URL

func (*NATSJetStreamServer) GetServer

func (s *NATSJetStreamServer) GetServer() *server.Server

GetServer returns the NATS server instance

func (*NATSJetStreamServer) IsRunning

func (s *NATSJetStreamServer) IsRunning() bool

IsRunning returns true if the server is running

type Params

type Params struct {
	fx.In

	Lifecycle fx.Lifecycle
	Logger    *zap.Logger
}

Jump to

Keyboard shortcuts

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