Documentation ¶
Index ¶
- func EC2PublicHostname() (string, error)
- func GetEndpoint() string
- type ContainerEvent
- type ServiceRuntime
- func (s *ServiceRuntime) EnvFor(container *docker.Container) map[string]string
- func (s *ServiceRuntime) GetImageByName(img string) (*docker.APIImages, error)
- func (s *ServiceRuntime) InspectContainer(id string) (*docker.Container, error)
- func (s *ServiceRuntime) InspectImage(image string) (*docker.Image, error)
- func (s *ServiceRuntime) InstanceCount(app, versionId string) (int, error)
- func (s *ServiceRuntime) ManagedContainers() ([]*docker.Container, error)
- func (s *ServiceRuntime) NextInstanceSlot(app, versionId string) (int, error)
- func (s *ServiceRuntime) Ping() error
- func (s *ServiceRuntime) PullImage(version, id string) (*docker.Image, error)
- func (s *ServiceRuntime) RegisterAll(env, pool, hostIP string) ([]*config.ServiceRegistration, error)
- func (s *ServiceRuntime) RegisterEvents(env, pool, hostIP string, listener chan ContainerEvent) error
- func (s *ServiceRuntime) RunCommand(env string, appCfg config.App, cmd []string) (*docker.Container, error)
- func (s *ServiceRuntime) Start(env, pool string, appCfg config.App) (*docker.Container, error)
- func (s *ServiceRuntime) StartInteractive(env, pool string, appCfg config.App) error
- func (s *ServiceRuntime) Stop(appCfg config.App) error
- func (s *ServiceRuntime) StopAll(env string) error
- func (s *ServiceRuntime) StopAllMatching(name string) error
- func (s *ServiceRuntime) StopOldVersion(appCfg config.App, limit int) error
- func (s *ServiceRuntime) StopUnassigned(env, pool string) error
- func (s *ServiceRuntime) UnRegisterAll(env, pool, hostIP string) ([]*docker.Container, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EC2PublicHostname ¶
func GetEndpoint ¶
func GetEndpoint() string
Types ¶
type ContainerEvent ¶
type ContainerEvent struct { Status string Container *docker.Container ServiceRegistration *config.ServiceRegistration }
type ServiceRuntime ¶
type ServiceRuntime struct {
// contains filtered or unexported fields
}
func NewServiceRuntime ¶
func NewServiceRuntime(configStore *config.Store, dns, hostIP string) *ServiceRuntime
func (*ServiceRuntime) EnvFor ¶
func (s *ServiceRuntime) EnvFor(container *docker.Container) map[string]string
func (*ServiceRuntime) GetImageByName ¶
func (s *ServiceRuntime) GetImageByName(img string) (*docker.APIImages, error)
func (*ServiceRuntime) InspectContainer ¶
func (s *ServiceRuntime) InspectContainer(id string) (*docker.Container, error)
func (*ServiceRuntime) InspectImage ¶
func (s *ServiceRuntime) InspectImage(image string) (*docker.Image, error)
func (*ServiceRuntime) InstanceCount ¶
func (s *ServiceRuntime) InstanceCount(app, versionId string) (int, error)
func (*ServiceRuntime) ManagedContainers ¶
func (s *ServiceRuntime) ManagedContainers() ([]*docker.Container, error)
func (*ServiceRuntime) NextInstanceSlot ¶
func (s *ServiceRuntime) NextInstanceSlot(app, versionId string) (int, error)
func (*ServiceRuntime) Ping ¶
func (s *ServiceRuntime) Ping() error
func (*ServiceRuntime) PullImage ¶
func (s *ServiceRuntime) PullImage(version, id string) (*docker.Image, error)
Pull a docker image. If we have an image matching the tag, and the given id matches the current image, don't fetch a new one from the registry.
func (*ServiceRuntime) RegisterAll ¶
func (s *ServiceRuntime) RegisterAll(env, pool, hostIP string) ([]*config.ServiceRegistration, error)
func (*ServiceRuntime) RegisterEvents ¶
func (s *ServiceRuntime) RegisterEvents(env, pool, hostIP string, listener chan ContainerEvent) error
RegisterEvents monitors the docker daemon for events, and returns those that require registration action over the listener chan.
func (*ServiceRuntime) RunCommand ¶
func (*ServiceRuntime) StartInteractive ¶
func (s *ServiceRuntime) StartInteractive(env, pool string, appCfg config.App) error
func (*ServiceRuntime) StopAll ¶
func (s *ServiceRuntime) StopAll(env string) error
func (*ServiceRuntime) StopAllMatching ¶
func (s *ServiceRuntime) StopAllMatching(name string) error
func (*ServiceRuntime) StopOldVersion ¶
func (s *ServiceRuntime) StopOldVersion(appCfg config.App, limit int) error
func (*ServiceRuntime) StopUnassigned ¶ added in v0.7.0
func (s *ServiceRuntime) StopUnassigned(env, pool string) error
Stop any running galaxy containers that are not assigned to us TODO: We call ManagedContainers a lot, repeatedly listing and inspecting all containers.
func (*ServiceRuntime) UnRegisterAll ¶
func (s *ServiceRuntime) UnRegisterAll(env, pool, hostIP string) ([]*docker.Container, error)
Click to show internal directories.
Click to hide internal directories.