Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LocalSourceType represents read configuration from local file LocalSourceType = "local" // ManagerSourceType represents pulling configuration from manager ManagerSourceType = "manager" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderConfigOption ¶
type DecoderConfigOption func(*mapstructure.DecoderConfig)
A DecoderConfigOption can be passed to dynconfig Unmarshal to configure mapstructure.DecoderConfig options
type Dynconfig ¶
type Dynconfig struct {
// contains filtered or unexported fields
}
func New ¶
func New(sourceType SourceType, options ...Option) (*Dynconfig, error)
New returns a new dynconfig instance
func NewDynconfigWithOptions ¶
func NewDynconfigWithOptions(sourceType SourceType, options ...Option) (*Dynconfig, error)
NewDynconfigWithOptions constructs a new instance of a dynconfig with additional options.
type ManagerClient ¶
managerClient is a client of manager
type Option ¶
Option is a functional option for configuring the dynconfig
func WithExpireTime ¶
WithExpireTime set the expire time for cache
func WithLocalConfigPath ¶
WithLocalConfigPath set the file path
func WithManagerClient ¶
func WithManagerClient(c ManagerClient) Option
WithManagerClient set the manager client
type SourceType ¶
type SourceType string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.