natsclient

package
v0.0.0-...-afb7f6e Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NatsRequestTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(addr, credFile string) (nc *nats.Conn, err error)

NewConnection creates a new NATS connection

func Partition

func Partition() (part uint32, name string, err error)

Partition calculates a partition to publish data to based on the hostname always yields the same partition for the same name. Uses SHIPPER_PARTITIONS to determine the amount of desired partitions. SHIPPER_PARTITIONS of 0 will always return partition 0

func SigHandler

func SigHandler() chan os.Signal

SigHandler sets up interrupt signal handlers

Types

This section is empty.

Jump to

Keyboard shortcuts

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