Documentation ¶
Index ¶
- Variables
- type Consul
- type Environment
- type Option
- func WithConsul(c Consul) Option
- func WithDatabases(dbs ...database.Database) Option
- func WithEnvironment(env Environment) Option
- func WithExitListeners(listeners ...life.Listener) Option
- func WithHealthCheck() Option
- func WithListenPort(port int) Option
- func WithPlugins(plugins ...plugin.Plugin) Option
- func WithRestartListeners(listeners ...life.Listener) Option
- func WithServerCerts(pubkey []byte, prikey []byte) Option
- func WithServerName(name string) Option
- func WithStackSkip(i int) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingServerName = errors.New("missing server name") ErrInvalidPort = errors.New("invalid port number") )
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment string
const ( Development Environment = "development" Production Environment = "production" )
func (Environment) String ¶
func (e Environment) String() string
type Option ¶
type Option func(*Options)
func WithConsul ¶
func WithDatabases ¶
func WithExitListeners ¶
func WithHealthCheck ¶
func WithHealthCheck() Option
func WithListenPort ¶
func WithPlugins ¶
func WithRestartListeners ¶
func WithServerCerts ¶
func WithServerName ¶
func WithStackSkip ¶
type Options ¶
type Options struct { // ID is the service ID ID string ServerName string ListenPort int ENV Environment ConsulCenter Consul DBs map[category.Category]database.Database HealthCheck bool // StackSkip for logging that it can be used to debug stacks // default: 1 StackSkip int Plugins []plugin.Plugin // ServerCerts ... ServerCerts *certs WhenExit []life.Listener WhenRestart []life.Listener }
Option defines
Click to show internal directories.
Click to hide internal directories.