Add docker container support

This commit is contained in:
kota kanbe
2016-04-30 10:58:24 +09:00
parent 7d924d2b0c
commit 5e336b5928
20 changed files with 958 additions and 371 deletions

View File

@@ -188,8 +188,6 @@ func (c *SlackConf) Validate() (errs []error) {
errs = append(errs, err)
}
// TODO check if slack configration is valid
return
}
@@ -202,12 +200,33 @@ type ServerInfo struct {
Port string
KeyPath string
KeyPassword string
SudoOpt SudoOption
CpeNames []string
// DebugLog Color
LogMsgAnsiColor string
// Container Names or IDs
Containers []string
// userd internal
LogMsgAnsiColor string // DebugLog Color
SudoOpt SudoOption
Container Container
}
// IsContainer returns whether this ServerInfo is about container
func (s ServerInfo) IsContainer() bool {
return 0 < len(s.Container.ContainerID)
}
// SetContainer set container
func (s *ServerInfo) SetContainer(d Container) {
s.Container = d
}
// Container has Container information.
type Container struct {
ContainerID string
Name string
Type string
}
// SudoOption is flag of sudo option.