Documentation ¶
Index ¶
- Constants
- type ConfigHook
- type ConfigHookService
- type DockerEvent
- type DockerService
- func (r *DockerService) Close()
- func (r *DockerService) Environment(containerId string) (map[string]string, error)
- func (r *DockerService) GetFile(containerID, filename string) (string, error)
- func (r *DockerService) HasFile(containerID, filename string) (bool, error)
- func (r *DockerService) List() ([]string, error)
- func (r *DockerService) Watch(channel DockerEvent, event string)
- type DockerStore
- type HookExec
- type HookFile
- type HookKeys
- type HookParser
- type Hooks
- type ShutdownChannel
Constants ¶
View Source
const ( DOCKER_START = "start" DOCKER_DIE = "die" DOCKER_CREATED = "created" DOCKER_DESTROY = "destroy" )
View Source
const ( HOOK_KEYS = "KEYS" HOOK_FILE = "FILE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigHook ¶
type ConfigHook interface {
// close down any resources
Close()
}
func NewConfigHook ¶
func NewConfigHook() (ConfigHook, error)
type ConfigHookService ¶
type ConfigHookService struct {
// contains filtered or unexported fields
}
func (*ConfigHookService) Close ¶
func (r *ConfigHookService) Close()
type DockerEvent ¶
type DockerEvent chan string
type DockerService ¶
The implementation of the above
func (*DockerService) Close ¶
func (r *DockerService) Close()
func (*DockerService) Environment ¶
func (r *DockerService) Environment(containerId string) (map[string]string, error)
func (*DockerService) GetFile ¶
func (r *DockerService) GetFile(containerID, filename string) (string, error)
func (*DockerService) HasFile ¶
func (r *DockerService) HasFile(containerID, filename string) (bool, error)
func (*DockerService) List ¶
func (r *DockerService) List() ([]string, error)
Retrieve a listing of the containers
func (*DockerService) Watch ¶
func (r *DockerService) Watch(channel DockerEvent, event string)
type DockerStore ¶
type DockerStore interface { // retrieve the contents of a file in a container GetFile(containerID, filename string) (string, error) // Get a listing of containers List() ([]string, error) // watch for docker events Watch(channel DockerEvent, event_type string) // retrieve the environment variables for a container Environment(containerID string) (map[string]string, error) // Close down the resources Close() }
The interface to docker
func NewDockerStore ¶
func NewDockerStore() (DockerStore, error)
type HookExec ¶
type HookFile ¶
type HookFile struct { // the id which is associated to the config ID string `json:"id"` // the file which holds the content File string `json:"file"` // the key which this file should be stored at Key string `json:"key"` // the exec which should be run when content changed Exec *HookExec `json:"exec"` // the flags associated to the config Flags string `json:"flags"` }
func NewHookFile ¶
type HookKeys ¶
type HookKeys struct { // the id which is associated to the keys ID string `json:"id"` // the file which holds the content File string `json:"file"` // the flags associated to the config Flags string `json:"flags"` }
func NewHookKeys ¶
type HookParser ¶
type HookParser interface { // parser the hook key ParseKey(key string) (string, string, error) // is a config hook IsHook(key string) bool // check if the config has any hooks HasHooks() bool // retrieve the files Files(name string) *HookFile // retrieve the keys Keys(name string) *HookKeys // validate the hooks Validate() error }
type Hooks ¶
type Hooks struct { HookParser // contains filtered or unexported fields }
func NewHooksConfig ¶
func NewHooksConfig() *Hooks
type ShutdownChannel ¶
type ShutdownChannel chan bool
Click to show internal directories.
Click to hide internal directories.