zookeeperconfigsource

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

Zookeeper Config Source (Alpha)

Use the Zookeeper config source to retrieve data from Zookeeper and inject it into your collector configuration.

Configuration

Under the config_sources: use zookeeper: or zookeeper/<name>: to create a Zookeeper config source. The following parameters are available to customize Zookeeper config sources:

config_sources:
  zookeeper:
    # endpoint is the Zookeeper server addresses. Config source will try to connect to
    # these endpoints to access an Zookeeper cluster.
    endpoints: [http://localhost:2181]
    # timeout sets the amount of time for which a session is considered valid after
    # losing connection to a server. Within the session timeout it's possible to 
    # reestablish a connection to a different server and keep the same session.
    timeout: 10s

If multiple paths are needed create different instances of the config source, example:

config_sources:
    # Assuming that the environment variables ZOOKEEPER_ADDR is the defined and the 
    # different secrets are on the same server but at different paths.
    zookeeper:
      endpoints: [$ZOOKEEPER_ADDR]
    zookeeper/another_cluster:
      endpoints: [$ZOOKEEPER_2_ADDR]
      timeout: 15s

# Both Zookeeper config sources can be used via their full name. Hypothetical example:
components:
  component_using_zookeeper:
    token: $zookeeper:/data/token

  component_using_zookeeper_another_cluster:
    token: $zookeeper/another_cluster:/data/token

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() configprovider.Factory

NewFactory returns a new zookeekeper config source factory

Types

type Config

type Config struct {
	*configprovider.Settings
	Endpoints []string      `mapstructure:"endpoints"`
	Timeout   time.Duration `mapstructure:"timeout"`
}

Config defines zookeeperconfigsource configuration

Jump to

Keyboard shortcuts

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