discovery

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package discovery provides discovery configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// Type defines the type of discovery configuration being used.
	Type *ConfigurationType `yaml:"type"`

	// M3DBCluster defines M3DB discovery via etcd.
	M3DBCluster *M3DBClusterDiscoveryConfiguration `yaml:"m3dbCluster"`

	// M3AggregatorCluster defines M3Aggregator discovery via etcd.
	M3AggregatorCluster *M3AggregatorClusterDiscoveryConfiguration `yaml:"m3AggregatorCluster"`

	// Config defines a generic definition for service discovery via etcd.
	Config *environment.Configuration `yaml:"config"`
}

Configuration defines how services are to be discovered.

func (*Configuration) EnvironmentConfig

func (c *Configuration) EnvironmentConfig(
	hostID string,
) (environment.Configuration, error)

EnvironmentConfig provides the environment configuration based on the type of discovery configuration set.

type ConfigurationType

type ConfigurationType uint

ConfigurationType defines the type of discovery configuration.

const (
	// ConfigType defines a generic definition for service discovery via etcd.
	ConfigType ConfigurationType = iota
	// M3DBSingleNodeType defines configuration for a single M3DB node via etcd.
	M3DBSingleNodeType
	// M3DBClusterType defines M3DB discovery via etcd.
	M3DBClusterType
	// M3AggregatorClusterType defines M3DB discovery via etcd.
	M3AggregatorClusterType
)

func (*ConfigurationType) MarshalYAML added in v1.6.0

func (t *ConfigurationType) MarshalYAML() (interface{}, error)

MarshalYAML marshals a ConfigurationType.

func (ConfigurationType) String

func (t ConfigurationType) String() string

String returns the discovery configuration type as a string.

func (*ConfigurationType) UnmarshalYAML

func (t *ConfigurationType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals an ConfigurationType into a valid type from string.

type M3AggregatorClusterDiscoveryConfiguration

type M3AggregatorClusterDiscoveryConfiguration struct {
	Env       string   `yaml:"env"`
	Zone      *string  `yaml:"zone"`
	Endpoints []string `yaml:"endpoints"`
}

M3AggregatorClusterDiscoveryConfiguration defines discovery configuration for M3Aggregator.

type M3DBClusterDiscoveryConfiguration

type M3DBClusterDiscoveryConfiguration struct {
	Env       string   `yaml:"env" validate:"nonzero"`
	Zone      *string  `yaml:"zone"`
	Endpoints []string `yaml:"endpoints"`
}

M3DBClusterDiscoveryConfiguration defines discovery configuration for M3DB.

Jump to

Keyboard shortcuts

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