gnats

package
v0.6.32 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVER_URL_KEY        = "nats.url"
	TIMEOUT_KEY           = "nats.timeout"
	USER_KEY              = "nats.user"
	PWD_KEY               = "nats.password"
	ServerName            = "server.name"
	MAX_RETRY_TIMES       = 50
	DefaultPullBatchSize  = 34
	DefaultStreamPrefix   = "public"
	NatsScheduleTarget    = "Nats-Schedule-Target"
	NatsSchedule          = "Nats-Schedule"
	ScheduleAt            = "@at "
	ScheduleSubjectSubfix = ".schedules."
)

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(opt Option) (mq.IClient, error)

func NewDefaultConnection

func NewDefaultConnection() (mq.IClient, error)

Types

type Option

type Option struct {
	Url                 string        `property:"nats.url"`
	User                string        `property:"nats.user"`
	Password            string        `property:"nats.password"`
	AppName             string        `property:"nats.appName"`
	Timeout             time.Duration `property:"nats.timeout"`
	MaxPingsOutstanding int           `property:"nats.maxPingsOutstanding"`
}

Jump to

Keyboard shortcuts

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