nats

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "nats"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable      bool   `env:"NATS_ENABLE" default:"false" yaml:"enable"`
	Host        string `env:"NATS_HOST" yaml:"host"`
	ClientName  string `default:"mesh-node" env:"NATS_CLIENT_NAME" yaml:"clientName"`
	ClusterID   string `env:"NATS_CLUSTER_ID" yaml:"clusterId"`
	ClientID    string `env:"NATS_CLIENT_ID" yaml:"clientId"`
	WorkerQueue string `env:"NATS_WORKER_QUEUE" default:"mesh.worker-queue" yaml:"workerQueue"`
	JetStream   struct {
		Timeout int `env:"JETSTREAM_TIMEOUT" default:"10" yaml:"timeout"`
	} `yaml:"jetstream"`
}

type Plugin

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

func New

func New() *Plugin

func (*Plugin) Boot

func (p *Plugin) Boot(conf interface{}, dependencies ...interface{}) plugins.Plugin

func (*Plugin) Close

func (p *Plugin) Close() error

func (*Plugin) IsEnabled

func (p *Plugin) IsEnabled() bool

func (*Plugin) JS

func (p *Plugin) JS() *jsm.Manager

func (*Plugin) NC

func (p *Plugin) NC() *nats.Conn

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) SC

func (p *Plugin) SC() stan.Conn

func (*Plugin) Start

func (p *Plugin) Start() error

Jump to

Keyboard shortcuts

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