cfg

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 8 Imported by: 0

README

EXAMPLE

r := cfg.New("consul", "127.0.0.1:8500", "sok")
r.Dial()

Documentation

Index

Constants

View Source
const (
	ConsulProvider = "consul"
)

Variables

This section is empty.

Functions

func Default

func Default()

func HomeConf

func HomeConf() error

func LocalDefault

func LocalDefault() error

Types

type Cfg

type Cfg struct {
	// contains filtered or unexported fields
}

func New

func New(provider, endpoint, path string, opts ...Option) *Cfg

func (*Cfg) Dial

func (cfg *Cfg) Dial() error

type Option

type Option func(o *options)

func WithConfigType

func WithConfigType(ct string) Option

func WithSecureProvider

func WithSecureProvider(key string) Option

func WithWatchTime

func WithWatchTime(time time.Duration) Option

Jump to

Keyboard shortcuts

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