client

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, fileWatcher *fsnotify.Watcher, logger log.Logger) (*Client, error)

func (*Client) AddCloseFunc

func (c *Client) AddCloseFunc(f func())

func (*Client) Close

func (c *Client) Close()

func (*Client) GetConn

func (c *Client) GetConn() *nats.Conn

type Config

type Config struct {
	URL            string              `yaml:"url" json:"url"`
	FlusherTimeout time.Duration       `yaml:"flusherTimeout" json:"flusherTimeout"`
	PendingLimits  PendingLimitsConfig `yaml:"pendingLimits" json:"pendingLimits"`
	TLS            client.Config       `yaml:"tls" json:"tls"`
	Options        []nats.Option       `yaml:"-" json:"-"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ConfigPublisher

type ConfigPublisher struct {
	JetStream bool `yaml:"jetstream" json:"jetstream"`
	Config    `yaml:",inline" json:",inline"`
}

func (*ConfigPublisher) Validate

func (c *ConfigPublisher) Validate() error

type PendingLimitsConfig

type PendingLimitsConfig struct {
	MsgLimit   int `yaml:"msgLimit" json:"msgLimit"`
	BytesLimit int `yaml:"bytesLimit" json:"bytesLimit"`
}

func (*PendingLimitsConfig) Validate

func (c *PendingLimitsConfig) Validate() error

Jump to

Keyboard shortcuts

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