dynconfig

package
v2.1.39 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 7 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
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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