Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerStore ¶
type ContainerStore interface { AddContainerByID(id string) error IAMRoles() []string IAMRoleForIP(ip string) (string, error) IAMRoleForID(ip string) (string, error) RemoveContainer(name string) SyncRunningContainers() error }
ContainerStore exposes methods to handle container lifecycle events. Instances of this interface should allow threadsafe reads and writes.
func NewContainerStore ¶
func NewContainerStore(client RawClient) ContainerStore
NewContainerStore creates an empty container store.
type EventHandler ¶
type EventHandler interface {
Listen(<-chan *dockerClient.APIEvents) error
}
EventHandler instances implement DockerEventsChannel() which performs actions based on Docker events. Listen() is a blocking function which performs an action based on the events written to the channel.
func NewEventHandler ¶
func NewEventHandler(workers int, containerStore ContainerStore, credentialStore iam.CredentialStore) EventHandler
NewEventHandler a new event handler that updates the container and IAM stores based on Docker event updates.
type RawClient ¶
type RawClient interface { AddEventListener(chan<- *dockerClient.APIEvents) error InspectContainer(id string) (*dockerClient.Container, error) ListContainers(opts dockerClient.ListContainersOptions) ([]dockerClient.APIContainers, error) }
RawClient specifies the subset of commands that EventHandlers use from the go-dockerclient.
Click to show internal directories.
Click to hide internal directories.