manager

package
v0.0.0-...-24c7f32 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SetConfigAlreadyApplied = "Already applied:"

SetConfigAlreadyApplied is a string constant for "Already applied:"

Variables

This section is empty.

Functions

func BuildTree

func BuildTree(values []change.ConfigValue, pretty bool) ([]byte, error)

BuildTree is a function that takes an ordered array of ConfigValues and produces a structured formatted tree

Types

type Leaf

type Leaf struct {
	Attr  string
	Value string
}

Leaf is at the end of a branch

type Manager

type Manager struct {
	ConfigStore    *store.ConfigurationStore
	ChangeStore    *store.ChangeStore
	DeviceStore    *topocache.DeviceStore
	NetworkStore   *store.NetworkStore
	TopoChannel    chan events.Event
	ChangesChannel chan events.Event
}

Manager single point of entry for the config system

func GetManager

func GetManager() *Manager

GetManager returns the initialized and running instance of manager. Should be called only after NewManager and Run are done.

func NewManager

func NewManager(configs *store.ConfigurationStore, changes *store.ChangeStore, device *topocache.DeviceStore,
	network *store.NetworkStore, topoCh chan events.Event) *Manager

NewManager initializes the network config manager subsystem.

func (*Manager) Close

func (m *Manager) Close()

Close kills the channels and manager related objects

func (*Manager) GetAllDeviceIds

func (m *Manager) GetAllDeviceIds() *[]string

GetAllDeviceIds returns a list of just DeviceIDs from the Config store

func (*Manager) GetNetworkConfig

func (m *Manager) GetNetworkConfig(target string, configname string, path string, layer int) ([]change.ConfigValue, error)

GetNetworkConfig returns a set of change values given a target, a configuration name, a path and a layer. The layer is the numbers of config changes we want to go back in time for. 0 is the latest

func (*Manager) Run

func (m *Manager) Run()

Run starts a synchronizer based on the devices and the northbound services

func (*Manager) SetNetworkConfig

func (m *Manager) SetNetworkConfig(target string, configName string, updates map[string]string,
	deletes []string) (change.ID, error)

SetNetworkConfig sets the given value, according to the path on the configuration for the specified targed

type Node

type Node struct {
	Name     string
	Children []*Node
	Leaves   []*Leaf
}

Node is at the root or branch of a tree

Jump to

Keyboard shortcuts

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