Documentation ¶
Index ¶
- Variables
- func ClusterClientWrapper(c *cluster.Client) clusterClientWrapper
- func ExpandFormation(c ControllerClient, f *ct.Formation) (*ct.ExpandedFormation, error)
- func FormationTagsEqual(a, b map[string]map[string]string) bool
- func JobConfig(f *ct.ExpandedFormation, name, hostID string, uuid string) *host.Job
- func JobMetaFromMetadata(metadata map[string]string) map[string]string
- func ProvisionVolume(h VolumeCreator, job *host.Job) error
- type ClusterClient
- type ControllerClient
- type FormationKey
- type HostClient
- type VolumeCreator
Constants ¶
This section is empty.
Variables ¶
View Source
var AppNamePattern = regexp.MustCompile(`^[a-z\d]+(-[a-z\d]+)*$`)
Functions ¶
func ClusterClientWrapper ¶
func ExpandFormation ¶
func ExpandFormation(c ControllerClient, f *ct.Formation) (*ct.ExpandedFormation, error)
func JobConfig ¶
func JobConfig(f *ct.ExpandedFormation, name, hostID string, uuid string) *host.Job
func ProvisionVolume ¶
func ProvisionVolume(h VolumeCreator, job *host.Job) error
Types ¶
type ClusterClient ¶
type ClusterClient interface { Host(string) (HostClient, error) Hosts() ([]HostClient, error) StreamHostEvents(chan *discoverd.Event) (stream.Stream, error) }
type ControllerClient ¶
type ControllerClient interface { GetApp(appID string) (*ct.App, error) GetRelease(releaseID string) (*ct.Release, error) GetArtifact(artifactID string) (*ct.Artifact, error) GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error) CreateApp(app *ct.App) error CreateRelease(release *ct.Release) error CreateArtifact(artifact *ct.Artifact) error PutFormation(formation *ct.Formation) error StreamFormations(since *time.Time, ch chan<- *ct.ExpandedFormation) (stream.Stream, error) AppList() ([]*ct.App, error) FormationListActive() ([]*ct.ExpandedFormation, error) PutJob(*ct.Job) error JobListActive() ([]*ct.Job, error) }
type FormationKey ¶
type FormationKey struct {
AppID, ReleaseID string
}
func NewFormationKey ¶
func NewFormationKey(appID, releaseID string) FormationKey
func (FormationKey) String ¶
func (f FormationKey) String() string
type HostClient ¶
type HostClient interface { VolumeCreator ID() string Tags() map[string]string AddJob(*host.Job) error GetJob(id string) (*host.ActiveJob, error) Attach(*host.AttachReq, bool) (cluster.AttachClient, error) StopJob(string) error ListJobs() (map[string]host.ActiveJob, error) StreamEvents(id string, ch chan *host.Event) (stream.Stream, error) GetStatus() (*host.HostStatus, error) }
Click to show internal directories.
Click to hide internal directories.