runtime

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: MIT Imports: 16 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EC2PublicHostname

func EC2PublicHostname() (string, error)

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 (s *ServiceRuntime) RunCommand(env string, appCfg config.App, cmd []string) (*docker.Container, error)

func (*ServiceRuntime) Start

func (s *ServiceRuntime) Start(env, pool string, appCfg config.App) (*docker.Container, error)

func (*ServiceRuntime) StartInteractive

func (s *ServiceRuntime) StartInteractive(env, pool string, appCfg config.App) error

func (*ServiceRuntime) Stop

func (s *ServiceRuntime) Stop(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)

Jump to

Keyboard shortcuts

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