nats

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 1 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 {
	*nats.Conn
	Conf Config
}

func (*Client) Close

func (db *Client) Close() error

Close drains the NATS connection to flush pending messages before disconnecting.

func (*Client) Config

func (db *Client) Config() any

Config returns the embedded Conf as the configuration for injection.

func (*Client) Init

func (db *Client) Init() error

Init creates the NATS connection and stores it in Conn.

type Config

type Config nats.Options

func (*Config) AfterInject

func (c *Config) AfterInject()

AfterInject calls Init after config fields are populated.

func (*Config) BeforeInject

func (c *Config) BeforeInject()

BeforeInject is a no-op satisfying the Config interface.

func (*Config) Build

func (c *Config) Build() (*nats.Conn, error)

Build connects to NATS using the stored options.

func (*Config) Init

func (c *Config) Init()

Init is a no-op placeholder for future default initialization.

Jump to

Keyboard shortcuts

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