environment

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOverrides added in v0.14.1

type ClientOverrides struct {
	HostQueueFlushInterval   *time.Duration `yaml:"hostQueueFlushInterval"`
	TargetHostQueueFlushSize *int           `yaml:"targetHostQueueFlushSize"`
}

ClientOverrides represents M3DB client overrides for a given cluster.

type Configuration

type Configuration struct {
	// Services is used when a topology initializer is not supplied.
	Services DynamicConfiguration `yaml:"services"`

	// StaticConfiguration is used for running M3DB with static configs
	Statics StaticConfiguration `yaml:"statics"`

	// Presence of a (etcd) server in this config denotes an embedded cluster
	SeedNodes *SeedNodesConfig `yaml:"seedNodes"`
}

Configuration is a configuration that can be used to create namespaces, a topology, and kv store

func (Configuration) Configure

func (c Configuration) Configure(cfgParams ConfigurationParameters) (ConfigureResults, error)

Configure creates a new ConfigureResults

func (*Configuration) UnmarshalYAML added in v0.13.0

func (c *Configuration) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML normalizes the config into a list of services.

func (*Configuration) Validate added in v0.13.0

func (c *Configuration) Validate() error

Validate validates the configuration.

type ConfigurationParameters

type ConfigurationParameters struct {
	InstrumentOpts   instrument.Options
	HashingSeed      uint32
	HostID           string
	NewDirectoryMode os.FileMode
}

ConfigurationParameters are options used to create new ConfigureResults

type ConfigureResult added in v0.13.0

type ConfigureResult struct {
	NamespaceInitializer namespace.Initializer
	TopologyInitializer  topology.Initializer
	ClusterClient        clusterclient.Client
	KVStore              kv.Store
	Async                bool
	ClientOverrides      ClientOverrides
}

ConfigureResult stores initializers and kv store for dynamic and static configs

type ConfigureResults

type ConfigureResults []ConfigureResult

ConfigureResults stores initializers and kv store for dynamic and static configs

func (ConfigureResults) SyncCluster added in v0.13.0

func (c ConfigureResults) SyncCluster() (ConfigureResult, error)

SyncCluster returns the synchronous cluster in the ConfigureResults

type DynamicCluster added in v0.13.0

type DynamicCluster struct {
	Async           bool                      `yaml:"async"`
	ClientOverrides ClientOverrides           `yaml:"clientOverrides"`
	Service         *etcdclient.Configuration `yaml:"service"`
}

DynamicCluster is a single cluster in a dynamic configuration

type DynamicConfiguration added in v0.13.0

type DynamicConfiguration []*DynamicCluster

DynamicConfiguration is used for running M3DB with a dynamic config

func (DynamicConfiguration) SyncCluster added in v0.13.0

func (c DynamicConfiguration) SyncCluster() (*DynamicCluster, error)

SyncCluster returns the synchronous cluster in the DynamicConfiguration

func (DynamicConfiguration) Validate added in v0.13.0

func (c DynamicConfiguration) Validate() error

Validate validates the DynamicConfiguration.

type SeedNode

type SeedNode struct {
	HostID       string `yaml:"hostID"`
	Endpoint     string `yaml:"endpoint"`
	ClusterState string `yaml:"clusterState"`
}

SeedNode represents a seed node for the cluster

type SeedNodeSecurityConfig

type SeedNodeSecurityConfig struct {
	CAFile        string `yaml:"caFile"`
	CertFile      string `yaml:"certFile"`
	KeyFile       string `yaml:"keyFile"`
	TrustedCAFile string `yaml:"trustedCaFile"`
	CertAuth      bool   `yaml:"clientCertAuth"`
	AutoTLS       bool   `yaml:"autoTls"`
}

SeedNodeSecurityConfig contains the data used for security in seed nodes

type SeedNodesConfig

type SeedNodesConfig struct {
	RootDir                  string                 `yaml:"rootDir"`
	InitialAdvertisePeerUrls []string               `yaml:"initialAdvertisePeerUrls"`
	AdvertiseClientUrls      []string               `yaml:"advertiseClientUrls"`
	ListenPeerUrls           []string               `yaml:"listenPeerUrls"`
	ListenClientUrls         []string               `yaml:"listenClientUrls"`
	InitialCluster           []SeedNode             `yaml:"initialCluster"`
	ClientTransportSecurity  SeedNodeSecurityConfig `yaml:"clientTransportSecurity"`
	PeerTransportSecurity    SeedNodeSecurityConfig `yaml:"peerTransportSecurity"`
}

SeedNodesConfig defines fields for seed node

type StaticCluster added in v0.13.0

type StaticCluster struct {
	Async           bool                              `yaml:"async"`
	ClientOverrides ClientOverrides                   `yaml:"clientOverrides"`
	Namespaces      []namespace.MetadataConfiguration `yaml:"namespaces"`
	TopologyConfig  *topology.StaticConfiguration     `yaml:"topology"`
	ListenAddress   string                            `yaml:"listenAddress"`
}

StaticCluster is a single cluster in a static configuration

type StaticConfiguration

type StaticConfiguration []*StaticCluster

StaticConfiguration is used for running M3DB with a static config

func (StaticConfiguration) Validate added in v0.13.0

func (c StaticConfiguration) Validate() error

Validate validates the StaticConfiguration

Jump to

Keyboard shortcuts

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