nats

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	// Host url example: nats://localhost:4222
	Hosts         []string `json:","`
	ReconnectWait int      `json:",optional,default=5"`
	MaxReconnect  int      `json:",optional,default=5"`
	UserCred      string   `json:",optional"`
	NkeyFile      string   `json:",optional"`
	TlsClientCert string   `json:",optional"`
	TlsClientKey  string   `json:",optional"`
	TlsCACert     string   `json:",optional"`
	UserJwt       string   `json:",optional"`
}

func (Conf) NewConnect

func (c Conf) NewConnect() (*nats.Conn, error)

NewConnect returns a nats connection

func (Conf) NewJetStream

func (c Conf) NewJetStream() (jetstream.JetStream, error)

NewJetStream returns jet stream client instance

Jump to

Keyboard shortcuts

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