server

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNatsStream

func NewNatsStream(opts ...natsjs.Option) (events.Stream, error)

NewNatsStream returns a streaming client used by `Consume` and `Publish` methods retries exponentially to connect to a nats server

func RunNatsServer

func RunNatsServer(opts ...Option) error

RunNatsServer starts the nats server and blocks

Types

type Option

type Option func(*nserver.Options)

Option configures the nats server

func ClusterID added in v2.1.0

func ClusterID(clusterID string) Option

ClusterID sets the name for the nats cluster

func Host

func Host(url string) Option

Host sets the host URL for the nats server

func Port

func Port(port int) Option

Port sets the host URL for the nats server

Jump to

Keyboard shortcuts

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