options

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

func WithCfgSource added in v0.2.0

func WithCfgSource(inp ...string) Option

valid only on new or load

func WithCheckInterval

func WithCheckInterval(inp int64) Option

valid only on new

func WithOnChangeFn

func WithOnChangeFn(inp func(cfg interface{})) Option

valid only on new or load

func WithOnErrorFn

func WithOnErrorFn(inp func(error)) Option

valid only on new

type Options

type Options struct {
	Sources       []string          // config source
	CheckInterval int64             // file update check interval
	OnChangeFn    func(interface{}) // call it when the file is modified
	OnErrorFn     func(error)       // call it when an error occurs
}

Jump to

Keyboard shortcuts

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