opts

package
v0.0.0-...-ac2c546 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAddr ...
	DefaultAddr = "0.0.0.0:9090"
	// DefaultStatusAddr ...
	DefaultStatusAddr = ":8443"
	// DefaultLogFormat ...
	DefaultLogFormat = "text"
	// DefaultLogLevel ...
	DefaultLogLevel = "warn"
	// DefaultVerbose ...
	DefaultVerbose = false
	// DefaultDebug ...
	DefaultDebug = false
)

Variables

This section is empty.

Functions

func ConfigureLogger

func ConfigureLogger() error

ConfigureLogger ...

Types

type Opt

type Opt func(*Opts)

Opt ...

func WithAddr

func WithAddr(addr string) Opt

WithAddr ...

func WithDebug

func WithDebug() Opt

WithDebug ...

func WithLogger

func WithLogger(logger *zap.Logger) Opt

WithLogger ...

func WithSession

func WithSession(session *session.Session) Opt

WithSession ...

func WithStatusAddr

func WithStatusAddr(addr string) Opt

WithStatusAddr ...

func WithVerbose

func WithVerbose() Opt

WithVerbose ...

type Opts

type Opts struct {
	// Verbose ...
	Verbose bool
	// Debug ...
	Debug bool
	// Addr ...
	Addr string
	// StatusAddr ...
	StatusAddr string
	// LogFormat ...
	LogFormat string
	// LogLevel ...
	LogLevel string
	// Logger ...
	Logger *zap.Logger
	// Session ...
	Session *session.Session
}

Opts ...

func New

func New(opts ...Opt) *Opts

New ...

func NewDefaultOpts

func NewDefaultOpts() *Opts

DefaultOpts ...

func (*Opts) Configure

func (s *Opts) Configure(opts ...Opt) error

Configure ...

Jump to

Keyboard shortcuts

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