Documentation
¶
Index ¶
- Variables
- func InProcessConnection(srv ...nats.InProcessConnProvider) (*nats.Conn, error)
- func Reconfigure(options ...ServerOption) error
- func Run(ctx context.Context, options ...ServerOption) error
- func Start(options ...ServerOption) error
- func Stop() error
- type Peer
- type ServerOption
- func ClusterHost(host string) ServerOption
- func ClusterName(name string) ServerOption
- func ClusterPort(port int) ServerOption
- func DebugEnabled() ServerOption
- func DontListen() ServerOption
- func Host(host string) ServerOption
- func JetstreamEnabled() ServerOption
- func Nkeys(users []*natsserver.NkeyUser) ServerOption
- func Port(port int) ServerOption
- func ServerName(name string) ServerOption
- func StoreDir(dir string) ServerOption
- func TLS(cfg *tls.Config) ServerOption
- func TraceEnabled() ServerOption
- func Users(users []*natsserver.User) ServerOption
- func WithLogger(logger natsserver.Logger) ServerOption
- func WithOptions(serverOpts natsserver.Options) ServerOption
- func WithPeer(host string, port int) ServerOption
- func WithPeers(peers []Peer) ServerOption
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrServerNotRunning = errors.New("server is not running")
)
Functions ¶
func InProcessConnection ¶
func InProcessConnection(srv ...nats.InProcessConnProvider) (*nats.Conn, error)
func Reconfigure ¶
func Reconfigure(options ...ServerOption) error
func Start ¶
func Start(options ...ServerOption) error
Types ¶
type ServerOption ¶
type ServerOption func(*ServerOptions)
func ClusterHost ¶
func ClusterHost(host string) ServerOption
func ClusterName ¶
func ClusterName(name string) ServerOption
func ClusterPort ¶
func ClusterPort(port int) ServerOption
func DebugEnabled ¶
func DebugEnabled() ServerOption
func DontListen ¶
func DontListen() ServerOption
func Host ¶
func Host(host string) ServerOption
func JetstreamEnabled ¶
func JetstreamEnabled() ServerOption
func Nkeys ¶
func Nkeys(users []*natsserver.NkeyUser) ServerOption
func Port ¶
func Port(port int) ServerOption
func ServerName ¶
func ServerName(name string) ServerOption
func StoreDir ¶
func StoreDir(dir string) ServerOption
func TLS ¶
func TLS(cfg *tls.Config) ServerOption
func TraceEnabled ¶
func TraceEnabled() ServerOption
func Users ¶
func Users(users []*natsserver.User) ServerOption
func WithLogger ¶
func WithLogger(logger natsserver.Logger) ServerOption
func WithOptions ¶
func WithOptions(serverOpts natsserver.Options) ServerOption
func WithPeer ¶
func WithPeer(host string, port int) ServerOption
func WithPeers ¶
func WithPeers(peers []Peer) ServerOption
type ServerOptions ¶
type ServerOptions struct {
natsserver.Options
Logger natsserver.Logger
}
Click to show internal directories.
Click to hide internal directories.