Documentation
¶
Overview ¶
Package embed starts and supervises a single NATS JetStream server in-process. Single-node only per D-55.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node wraps a running NATS server instance.
func StartNode ¶
func StartNode(cfg NodeConfig) (*Node, error)
StartNode starts a single-node embedded NATS JetStream server. Host defaults to "127.0.0.1", ReadyWait defaults to 10s. Port 0 or -1 selects a random available port.
func (*Node) Server ¶
func (n *Node) Server() *natsserver.Server
Server returns the underlying NATS server instance.
Click to show internal directories.
Click to hide internal directories.