nats

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstance

func GetInstance() *natsLib.Conn

GetInstance 获取链接实例

func Init

func Init(conf Conf)

Init 初始化

func New

func New(conf Conf) *natsLib.Conn

New 初始化新的nats实例

Types

type Conf

type Conf struct {
	Servers  []string `yaml:"servers" toml:"servers" json:"servers"`    //服务实例列表
	Username string   `yaml:"username" toml:"username" json:"username"` //用户名
	Password string   `yaml:"password" toml:"password" json:"password"` //密码
}

Conf 配置

Jump to

Keyboard shortcuts

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