Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConnectString ¶
BuildConnectString builds a valid nats connection string given an url, user and passward
Types ¶
type Customer ¶
type Customer struct {
Customer string `help:"customer" default:"unknown-customer"`
}
type Database ¶
type Database struct { DbHost string `help:"database host" default:"127.0.0.1" json:"db-host"` Database string `help:"database" json:"database"` DbUser string `help:"database user" json:"db-user"` DbPass string `help:"database password" json:"db-pass"` DbPort int `help:"database port" min:"0" max:"65535" json:"db-port"` }
type LogLevel ¶
type LogLevel struct {
Log string `help:"log level (trace|debug|info|error)" short:"l" default:"info"`
}
LogLevel is the log level
type NatsConfig ¶
NatsConfig is a configuration structure for NATS.
func NewNatsConfig ¶
func NewNatsConfig(natsUrls []string, natsUser, natsPass string) *NatsConfig
NewNatsConfig creates a new NatsConfig.
func (*NatsConfig) NatsConnectString ¶
func (n *NatsConfig) NatsConnectString(serverIndex int) (string, error)
NatsConnectString returns a connection string to be used to connect to a NATS server.
type NatsPass ¶
type NatsPass struct {
Pass string `help:"NATS server password." short:"p" default:""`
}
NatsPass holds the password to connect to a NATS server.
type NatsUrls ¶
type NatsUrls struct { //Servers []string `help:"NATS server URLs." short:"s" default:"wss://megalarm:megalarm@nats.megalarm.fr:443"` Servers []string `help:"NATS server URLs." short:"s" default:"nats://nats:4222"` }
NatsUrls holds the URLs of the NATS servers.
type NatsUser ¶
type NatsUser struct {
User string `help:"NATS server user." short:"u" default:""`
}
NatsUser holds the user to connect to a NATS server.
type Password ¶
type Password struct {
Password string `help:"password" short:"p" json:"password"`
}
type Run ¶
type Run struct {
Run struct{} `cmd:"" help:"run the microservice."`
}
Run is the command to run the microservice
Click to show internal directories.
Click to hide internal directories.