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 GetEntrypoint(artifacts []*ct.Artifact, typ string) *ct.ImageEntrypoint
- func JobConfig(f *ct.ExpandedFormation, name, hostID string, uuid string) *host.Job
- func JobMetaFromMetadata(metadata map[string]string) map[string]string
- func ProvisionVolume(req *ct.VolumeReq, h VolumeCreator, job *host.Job) (*volume.Info, error)
- func SetupMountspecs(job *host.Job, artifacts []*ct.Artifact)
- 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 GetEntrypoint ¶
func GetEntrypoint(artifacts []*ct.Artifact, typ string) *ct.ImageEntrypoint
GetEntrypoint returns an image entrypoint for a process type from a list of artifacts, first iterating through them and returning any entrypoint having the exact type, then iterating through them and returning the artifact's default entrypoint if it has one.
The artifacts are traversed in reverse order so that entrypoints in the image being overlayed at the top are considered first.
func ProvisionVolume ¶
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(appID string, release *ct.Release) error CreateArtifact(artifact *ct.Artifact) error PutFormation(formation *ct.Formation) error PutScaleRequest(req *ct.ScaleRequest) 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) StreamSinks(since *time.Time, ch chan *ct.Sink) (stream.Stream, error) ListSinks() ([]*ct.Sink, error) VolumeList() ([]*ct.Volume, error) PutVolume(*ct.Volume) error StreamVolumes(since *time.Time, ch chan *ct.Volume) (stream.Stream, 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 DiscoverdDeregisterJob(string) error ListJobs() (map[string]host.ActiveJob, error) ListActiveJobs() (map[string]host.ActiveJob, error) StreamEvents(id string, ch chan *host.Event) (stream.Stream, error) ListVolumes() ([]*volume.Info, error) StreamVolumes(ch chan *volume.Event) (stream.Stream, error) GetStatus() (*host.HostStatus, error) GetSinks() ([]*ct.Sink, error) AddSink(*ct.Sink) error RemoveSink(string) error }
Click to show internal directories.
Click to hide internal directories.