nats

package
v3.13.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStream

func NewStream(opts ...Option) (events.Stream, error)

NewStream returns an initialized nats stream or an error if the connection to the nats server could not be established

Types

type Option

type Option func(o *Options)

Option is a function which configures options

func Address

func Address(addr string) Option

Address of the nats cluster

func ClientID

func ClientID(id string) Option

ClientID sets the client id for the nats connection

func ClusterID

func ClusterID(id string) Option

ClusterID sets the cluster id for the nats connection

func TLSConfig

func TLSConfig(t *tls.Config) Option

TLSConfig to use when connecting to the cluster

type Options

type Options struct {
	ClusterID string
	ClientID  string
	Address   string
	TLSConfig *tls.Config
}

Options which are used to configure the nats stream

Jump to

Keyboard shortcuts

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