config

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConfig added in v0.6.5

func WithConfig(newConfig *Config)

WithConfig passes in a predefined Config to use for testing

Types

type Config

type Config struct {
	// Mastership is the mastership configuration
	Mastership MastershipConfig `yaml:"mastership,omitempty"`
	// Atomix is the Atomix configuration
	Atomix atomix.Config `yaml:"atomix,omitempty"`
}

Config is the onos-config configuration

func GetConfig

func GetConfig() (Config, error)

GetConfig gets the onos-config configuration

func GetConfigOrDie

func GetConfigOrDie() Config

GetConfigOrDie gets the onos-config configuration or panics

type MastershipConfig

type MastershipConfig struct {
	// Partitions is the number of store partitions
	Partitions int `yaml:"partitions,omitempty"`
}

MastershipConfig is the configuration for store mastership

func (MastershipConfig) GetPartitions

func (c MastershipConfig) GetPartitions() int

GetPartitions returns the number of store partitions

Jump to

Keyboard shortcuts

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