Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultVerbose ... DefaultVerbose = false // DefaultTermSignal is the signal to term the agent. DefaultTermSignal = syscall.SIGTERM // DefaultReloadSignal is the default signal for reload. DefaultReloadSignal = syscall.SIGHUP // DefaultKillSignal is the default signal for termination. DefaultKillSignal = syscall.SIGINT )
Variables ¶
View Source
var ErrNotFound = fmt.Errorf("option not found")
ErrNotFound signals that this option is not set.
Functions ¶
This section is empty.
Types ¶
type DefaultOptions ¶
type DefaultOptions struct {
Options
}
DefaultOptions are a collection of default options.
func (*DefaultOptions) KillSignal ¶
func (o *DefaultOptions) KillSignal() syscall.Signal
KillSignal ...
func (*DefaultOptions) ReloadSignal ¶
func (o *DefaultOptions) ReloadSignal() syscall.Signal
ReloadSignal ...
func (*DefaultOptions) TermSignal ¶
func (o *DefaultOptions) TermSignal() syscall.Signal
TermSignal ...
type DefaultOpts ¶
type DefaultOpts interface { // Verbose ... Verbose() bool // ReloadSignal ... ReloadSignal() syscall.Signal // TermSignal ... TermSignal() syscall.Signal // KillSignal ... KillSignal() syscall.Signal Opts }
DefaultOpts ...
func NewDefaultOpts ¶
func NewDefaultOpts(opts ...OptFunc) DefaultOpts
NewDefaultOpts returns options with a default configuration.
type OptFunc ¶
type OptFunc func(Opts)
OptFunc is an option
func WithLogger ¶
WithLogger is setting a logger for options.
Click to show internal directories.
Click to hide internal directories.