natsServer

package
v1.9.20 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + libcfg.MinErrorComponentNats
	ErrorParamInvalid
	ErrorComponentNotInitialized
	ErrorConfigInvalid
	ErrorStartComponent
	ErrorReloadComponent
	ErrorDependencyTLSDefault
	ErrorDependencyLogDefault
)
View Source
const (
	DefaultTlsKey = "tls"
	ComponentType = "natsServer"
)

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(indent string) []byte

func Register

func Register(cfg libcfg.Config, key string, cpt ComponentNats)

func RegisterNew

func RegisterNew(cfg libcfg.Config, key, tlsKey string)

func SetDefaultConfig

func SetDefaultConfig(cfg []byte)

Types

type ComponentNats

type ComponentNats interface {
	libcfg.Component

	SetTLSKey(tlsKey string)
	GetServer() (libnat.Server, liberr.Error)
	SetStatusRouter(sts libsts.RouteStatus, prefix string)
}

func Load

func Load(getCpt libcfg.FuncComponentGet, key string) ComponentNats

func New

func New(tlsKey string) ComponentNats

Jump to

Keyboard shortcuts

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