Documentation ¶
Overview ¶
Package harvester is a configuration library which helps setting up and monitoring configuration values in order to dynamically reconfigure your application.
Index ¶
- type Builder
- func (b *Builder) Create() (Harvester, error)
- func (b *Builder) WithConsulFolderPrefixMonitor(addr, dataCenter, token, folderPrefix string, timeout time.Duration) *Builder
- func (b *Builder) WithConsulMonitor(addr, dataCenter, token string, timeout time.Duration) *Builder
- func (b *Builder) WithConsulSeed(addr, dataCenter, token string, timeout time.Duration) *Builder
- func (b *Builder) WithNotification(chNotify chan<- config.ChangeNotification) *Builder
- func (b *Builder) WithRedisMonitor(client redis.UniversalClient, pollInterval time.Duration) *Builder
- func (b *Builder) WithRedisSeed(client redis.UniversalClient) *Builder
- type Harvester
- type Monitor
- type Seeder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder of a harvester instance.
func (*Builder) WithConsulFolderPrefixMonitor ¶ added in v0.16.0
func (b *Builder) WithConsulFolderPrefixMonitor(addr, dataCenter, token, folderPrefix string, timeout time.Duration) *Builder
WithConsulFolderPrefixMonitor enables support for monitoring key/prefixes on ConsulLogger. It automatically parses the config and monitors every field found tagged with ConsulLogger.
func (*Builder) WithConsulMonitor ¶
WithConsulMonitor enables support for monitoring key/prefixes on ConsulLogger. It automatically parses the config and monitors every field found tagged with ConsulLogger.
func (*Builder) WithConsulSeed ¶
WithConsulSeed enables support for seeding values with consul.
func (*Builder) WithNotification ¶ added in v0.11.0
func (b *Builder) WithNotification(chNotify chan<- config.ChangeNotification) *Builder
WithNotification constructor.
func (*Builder) WithRedisMonitor ¶ added in v0.12.0
func (b *Builder) WithRedisMonitor(client redis.UniversalClient, pollInterval time.Duration) *Builder
WithRedisMonitor enables support for monitoring keys in Redis. It automatically parses the config and monitors every field found tagged with ConsulLogger.
func (*Builder) WithRedisSeed ¶ added in v0.12.0
WithRedisSeed enables support for seeding values with redis.
Directories ¶
Path | Synopsis |
---|---|
Package change supports change management of config values.
|
Package change supports change management of config values. |
Package config handles config struct parsing.
|
Package config handles config struct parsing. |
examples
|
|
Package log handles logging capabilities of harvester.
|
Package log handles logging capabilities of harvester. |
Package monitor handles config value monitoring and changing.
|
Package monitor handles config value monitoring and changing. |
consul
Package consul handles the monitor capabilities of harvester using ConsulLogger.
|
Package consul handles the monitor capabilities of harvester using ConsulLogger. |
redis
Package redis handles the monitor capabilities of harvester using redis.
|
Package redis handles the monitor capabilities of harvester using redis. |
Package seed handles seeding config values.
|
Package seed handles seeding config values. |
consul
Package consul handles seeding capabilities with consul.
|
Package consul handles seeding capabilities with consul. |
redis
Package redis handles seeding capabilities with redis.
|
Package redis handles seeding capabilities with redis. |
Package sync handles synchronized read and write access to config values.
|
Package sync handles synchronized read and write access to config values. |