configs

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotExist for invalid key provided
	ErrKeyNotExist = errors.New("the key does not exist")
	// ErrNotInitialized for uninitialized
	ErrNotInitialized = errors.New("the client does not be initialized, call With() first")
)

Functions

func Client

func Client() *api.Client

Client returns the consul client

func New

func New(addr, dc, prefix, token, sName string) *configs

Types

type Configs

type Configs interface {
	Prefix() string

	Get(key string) ([]byte, error)
	SGet(k string) ([]byte, error)

	Set(key, val string) error
}

func Get

func Get() Configs

Jump to

Keyboard shortcuts

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