dynconfig

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CacheDirName is dir name of dynconfig cache.
	CacheDirName = "dynconfig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dynconfig

type Dynconfig[T any] interface {
	// Get raw dynamic config.
	Get() (*T, error)

	// Refresh refreshes dynconfig in cache.
	Refresh() error
}

func New

func New[T any](client ManagerClient, cachePath string, expire time.Duration) (Dynconfig[T], error)

New returns a new dynconfig instance.

type ManagerClient

type ManagerClient interface {
	Get() (any, error)
}

managerClient is a client of manager.

type SourceType

type SourceType string

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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