cluster

package
v0.0.0-...-7a98856 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MachineID

func MachineID(root string) string

Types

type Backend

type Backend interface {
	Init(c *Cluster, machine *Machine)
	DeploymentComplete(d *deployment.Deployment)
	DeploymentFailed(d *deployment.Deployment)
	GetValue(key string) map[string]interface{}
	GetString(key string) string
	GetValues(key string) map[string]interface{}
	Watch(key string, callback func(string))
}

type Cluster

type Cluster struct {
	Machines      Machines `json:"machines"`
	Backend       Backend
	ClusterConfig map[string]interface{}
}

func (*Cluster) AddMachine

func (c *Cluster) AddMachine(machine *Machine)

func (*Cluster) GetMachine

func (c *Cluster) GetMachine(id string) *Machine

func (*Cluster) Init

func (c *Cluster) Init(backend Backend, configDirectory string)

func (*Cluster) InitFromConfig

func (c *Cluster) InitFromConfig(backend Backend, config conf.ServerConfiguration)

func (*Cluster) List

func (c *Cluster) List() *Machines

func (*Cluster) ParseConfig

func (c *Cluster) ParseConfig(configDirectory string)

func (*Cluster) ParseConfigFromBackend

func (c *Cluster) ParseConfigFromBackend(configBackend conf.ConfigurationBackend)

func (*Cluster) RemoveMachine

func (c *Cluster) RemoveMachine(machine *Machine)

type Machine

type Machine struct {
	Id       string   `json:"id"`
	Endpoint string   `json:"endpoint"`
	Tags     []string `json:"tags"`
}

func DeserializeMachine

func DeserializeMachine(s string) *Machine

func LocalMachine

func LocalMachine(endpoint string, tags []string) *Machine

func (*Machine) Serialize

func (m *Machine) Serialize() string

func (*Machine) TryDeploy

func (m *Machine) TryDeploy(d deployment.Deployment) bool

type Machines

type Machines []*Machine

Jump to

Keyboard shortcuts

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