mastercfg

package
v0.0.0-11-12-2015.00-5... Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StateBasePath is the base path for all state operations.
	StateBasePath = "/contiv.io/"
	// StateConfigPath is the path to the root of the configuration state
	StateConfigPath = StateBasePath + "state/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgEndpointState

type CfgEndpointState struct {
	core.CommonState
	NetID           string `json:"netID"`
	ContName        string `json:"contName"`
	ServiceName     string `json:"serviceName"`
	EndpointGroupID int    `json:"endpointGroupId"`
	AttachUUID      string `json:"attachUUID"`
	IPAddress       string `json:"ipAddress"`
	MacAddress      string `json:"macAddress"`
	HomingHost      string `json:"homingHost"`
	IntfName        string `json:"intfName"`
	VtepIP          string `json:"vtepIP"`
}

CfgEndpointState implements the State interface for an endpoint implemented using vlans with ovs. The state is stored as Json objects.

func (*CfgEndpointState) Clear

func (s *CfgEndpointState) Clear() error

Clear removes the state.

func (*CfgEndpointState) Read

func (s *CfgEndpointState) Read(id string) error

Read the state for a given identifier.

func (*CfgEndpointState) ReadAll

func (s *CfgEndpointState) ReadAll() ([]core.State, error)

ReadAll reads all state objects for the endpoints.

func (*CfgEndpointState) WatchAll

func (s *CfgEndpointState) WatchAll(rsps chan core.WatchState) error

WatchAll fills a channel on each state event related to endpoints.

func (*CfgEndpointState) Write

func (s *CfgEndpointState) Write() error

Write the state.

type CfgNetworkState

type CfgNetworkState struct {
	core.CommonState
	Tenant            string        `json:"tenant"`
	NetworkName       string        `json:"networkName"`
	PktTagType        string        `json:"pktTagType"`
	PktTag            int           `json:"pktTag"`
	ExtPktTag         int           `json:"extPktTag"`
	SubnetIP          string        `json:"subnetIP"`
	SubnetLen         uint          `json:"subnetLen"`
	Gateway           string        `json:"gateway"`
	EpCount           int           `json:"epCount"`
	IPAllocMap        bitset.BitSet `json:"ipAllocMap"`
	SubnetIsAllocated bool          `json:"subnetIsAllocated"`
	DNSServer         string        `json:"dnsServer"`
}

CfgNetworkState implements the State interface for a network implemented using vlans with ovs. The state is stored as Json objects.

func (*CfgNetworkState) Clear

func (s *CfgNetworkState) Clear() error

Clear removes the state.

func (*CfgNetworkState) Read

func (s *CfgNetworkState) Read(id string) error

Read the state for a given identifier

func (*CfgNetworkState) ReadAll

func (s *CfgNetworkState) ReadAll() ([]core.State, error)

ReadAll state and return the collection.

func (*CfgNetworkState) WatchAll

func (s *CfgNetworkState) WatchAll(rsps chan core.WatchState) error

WatchAll state transitions and send them through the channel.

func (*CfgNetworkState) Write

func (s *CfgNetworkState) Write() error

Write the state.

type EndpointGroupState

type EndpointGroupState struct {
	core.CommonState
	Name        string `json:"name"`
	Tenant      string `json:"tenant"`
	NetworkName string `json:"networkName"`
	PktTagType  string `json:"pktTagType"`
	PktTag      int    `json:"pktTag"`
	ExtPktTag   int    `json:"extPktTag"`
}

EndpointGroupState implements the State interface for endpoint group implemented using vlans with ovs. The state is stored as Json objects.

func (*EndpointGroupState) Clear

func (s *EndpointGroupState) Clear() error

Clear removes the state.

func (*EndpointGroupState) Read

func (s *EndpointGroupState) Read(id string) error

Read the state for a given identifier

func (*EndpointGroupState) ReadAll

func (s *EndpointGroupState) ReadAll() ([]core.State, error)

ReadAll state and return the collection.

func (*EndpointGroupState) WatchAll

func (s *EndpointGroupState) WatchAll(rsps chan core.WatchState) error

WatchAll state transitions and send them through the channel.

func (*EndpointGroupState) Write

func (s *EndpointGroupState) Write() error

Write the state.

type GlobConfig

type GlobConfig struct {
	core.CommonState
	NwInfraType string `json:"nw-infra-type"`
}

GlobConfig is the global configuration applicable to everything

func (*GlobConfig) Clear

func (s *GlobConfig) Clear() error

Clear removes the configuration from the state store.

func (*GlobConfig) Read

func (s *GlobConfig) Read(id string) error

Read the state in for a given ID.

func (*GlobConfig) ReadAll

func (s *GlobConfig) ReadAll() ([]core.State, error)

ReadAll reads all the state for master global configurations and returns it.

func (*GlobConfig) Write

func (s *GlobConfig) Write() error

Write the state

Jump to

Keyboard shortcuts

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