data

package
v0.0.0-...-3f5aa88 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyToPath

func KeyToPath(key string) string

Converts a key to a ZK path

func PathToKey

func PathToKey(path string) string

Converts a ZK path to a key

Types

type Agent

type Agent struct {
	Name       string
	Key        string
	AgentClass string
	OS         string
	Eph        string
	Processes  []Process
}

type Domain

type Domain struct {
	Name    string
	Key     string
	Runtime RuntimeConfig
	Config  StaticConfig
}

type Process

type Process struct {
	Name         string
	Key          string
	Command      string
	Arguments    string
	ProcessClass string
	AdminState   string
	OperState    string
	Pid          int
}

type RuntimeConfig

type RuntimeConfig struct {
	Agents []Agent
}

type StaticConfig

type StaticConfig struct {
	Agents    []Agent
	Processes []Process
}

type ZkDAO

type ZkDAO struct {
	// contains filtered or unexported fields
}

func NewZkDAO

func NewZkDAO(zookeeper []string) (*ZkDAO, error)

func (ZkDAO) CreateEphemeral

func (zkdao ZkDAO) CreateEphemeral(path string, data []byte) (string, error)

Creates an ephemeral node for the given path

func (*ZkDAO) GetValue

func (zkdao *ZkDAO) GetValue(path string) ([]byte, error)

func (*ZkDAO) LoadAgent

func (zkdao *ZkDAO) LoadAgent(key string, recursive bool) (Agent, error)

func (*ZkDAO) LoadDomain

func (zkdao *ZkDAO) LoadDomain(key string, recursive bool) (Domain, error)

func (*ZkDAO) LoadDomains

func (zkdao *ZkDAO) LoadDomains(key string, recursive bool) ([]Domain, error)

func (*ZkDAO) LoadProcess

func (zkdao *ZkDAO) LoadProcess(key string, recursive bool) (Process, error)

func (*ZkDAO) LoadRuntimeConfig

func (zkdao *ZkDAO) LoadRuntimeConfig(key string, recursive bool) (RuntimeConfig, error)

func (*ZkDAO) LoadStaticConfig

func (zkdao *ZkDAO) LoadStaticConfig(key string, recursive bool) (StaticConfig, error)

func (*ZkDAO) RemoveRecursive

func (zkdao *ZkDAO) RemoveRecursive(path string) error

func (*ZkDAO) SetValue

func (zkdao *ZkDAO) SetValue(path string, data []byte) error

func (*ZkDAO) UpdateAgent

func (zkdao *ZkDAO) UpdateAgent(key string, agent Agent, recursive bool) error

func (*ZkDAO) UpdateDomain

func (zkdao *ZkDAO) UpdateDomain(key string, domain Domain, recursive bool) error

func (*ZkDAO) UpdateProcess

func (zkdao *ZkDAO) UpdateProcess(key string, process Process, recursive bool) error

func (*ZkDAO) UpdateRuntimeConfig

func (zkdao *ZkDAO) UpdateRuntimeConfig(key string, runtime RuntimeConfig, recursive bool) error

func (*ZkDAO) UpdateStaticConfig

func (zkdao *ZkDAO) UpdateStaticConfig(key string, config StaticConfig, recursive bool) error

func (*ZkDAO) Watch

func (zkdao *ZkDAO) Watch(path string, watchChannel chan<- zk.Event) error

Jump to

Keyboard shortcuts

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