Documentation
¶
Index ¶
- Constants
- type Container
- func (c *Container) Delete() error
- func (c *Container) Exec(command []string) (types.ExecResult, error)
- func (c *Container) GetDefinition() contracts.IDefinition
- func (c *Container) GetDomain(network string) string
- func (c *Container) GetGeneratedName() string
- func (c *Container) GetGroup() string
- func (c *Container) GetGroupIdentifier() string
- func (c *Container) GetHeadlessDomain(network string) string
- func (c *Container) GetId() string
- func (c *Container) GetLabels() map[string]string
- func (c *Container) GetName() string
- func (c *Container) GetNode() uint64
- func (c *Container) GetNodeName() string
- func (c *Container) GetRuntime() *types.Runtime
- func (c *Container) GetState() (state.State, error)
- func (c *Container) GetStatus() *status.Status
- func (c *Container) HasDependencyOn(kind string, group string, name string) bool
- func (c *Container) HasOwner() bool
- func (c *Container) IsGhost() bool
- func (c *Container) Kill(signal string) error
- func (c *Container) Logs(follow bool) (io.ReadCloser, error)
- func (c *Container) PostRun(config *configuration.Configuration, dnsCache *dns.Records) error
- func (c *Container) PreRun(config *configuration.Configuration, client *client.Http, ...) error
- func (c *Container) RemoveDns(cache *dns.Records, networkId string) error
- func (c *Container) Rename(newName string) error
- func (c *Container) Restart() error
- func (c *Container) Run() error
- func (c *Container) SetGhost(ghost bool)
- func (c *Container) Start() error
- func (c *Container) Stop(signal string) error
- func (c *Container) SyncNetwork() error
- func (c *Container) ToJson() ([]byte, error)
- func (c *Container) UpdateDns(cache *dns.Records) error
- type General
- type IContainer
- type IPlatform
- type Registry
Constants ¶
View Source
const SPREAD_SPECIFIC string = "specific"
View Source
const SPREAD_UNIFORM string = "uniform"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Platform IPlatform General *General Type string Lock sync.RWMutex // contains filtered or unexported fields }
func (*Container) GetDefinition ¶
func (c *Container) GetDefinition() contracts.IDefinition
func (*Container) GetGeneratedName ¶
func (*Container) GetGroupIdentifier ¶
func (*Container) GetHeadlessDomain ¶
func (*Container) GetNodeName ¶
func (*Container) GetRuntime ¶
func (*Container) HasDependencyOn ¶
func (*Container) PostRun ¶
func (c *Container) PostRun(config *configuration.Configuration, dnsCache *dns.Records) error
func (*Container) PreRun ¶ added in v0.1.24
func (c *Container) PreRun(config *configuration.Configuration, client *client.Http, user *authentication.User) error
func (*Container) SyncNetwork ¶ added in v0.1.24
type IContainer ¶
type IContainer interface { Run() error PreRun(config *configuration.Configuration, client *client.Http, user *authentication.User) error PostRun(config *configuration.Configuration, dnsCache *dns.Records) error UpdateDns(dnsCache *dns.Records) error RemoveDns(dnsCache *dns.Records, networkId string) error SyncNetwork() error HasDependencyOn(string, string, string) bool HasOwner() bool GetState() (state.State, error) GetRuntime() *types.Runtime GetStatus() *status.Status GetNode() uint64 GetNodeName() string GetId() string GetDefinition() contracts.IDefinition GetLabels() map[string]string GetGeneratedName() string GetName() string GetGroup() string GetGroupIdentifier() string GetDomain(network string) string GetHeadlessDomain(network string) string IsGhost() bool SetGhost(bool) Start() error Stop(signal string) error Kill(signal string) error Restart() error Delete() error Rename(newName string) error Exec(command []string) (types.ExecResult, error) Logs(bool) (io.ReadCloser, error) ToJson() ([]byte, error) }
func New ¶
func New(platform string, name string, config *configuration.Configuration, definition contracts.IDefinition) (IContainer, error)
func NewGhost ¶
func NewGhost(state map[string]interface{}) (IContainer, error)
type IPlatform ¶
type IPlatform interface { Run() error PreRun(config *configuration.Configuration, client *client.Http, user *authentication.User, runtime *types.Runtime) error PostRun(config *configuration.Configuration, dnsCache *dns.Records) error UpdateDns(dnsCache *dns.Records) error RemoveDns(dnsCache *dns.Records, networkId string) error SyncNetwork() error GetState() (state.State, error) GetId() string GetDefinition() contracts.IDefinition GetGeneratedName() string GetName() string GetGroup() string GetGroupIdentifier() string GetDomain(networkName string) string GetHeadlessDomain(networkName string) string Start() error Stop(signal string) error Kill(signal string) error Restart() error Delete() error Rename(newName string) error Exec(command []string) (types.ExecResult, error) Logs(bool) (io.ReadCloser, error) ToJson() ([]byte, error) }
type Registry ¶ added in v0.1.24
type Registry interface { AddOrUpdate(group string, name string, containerAddr IContainer) Sync(group string, name string) error Remove(prefix string, group string, name string) error FindLocal(group string, name string) IContainer Find(prefix string, group string, name string) IContainer FindGroup(prefix string, group string) []IContainer Name(client *client.Http, group string, name string) (string, []uint64) NameReplica(group string, name string, index uint64) string BackOff(group string, name string) error BackOffReset(group string, name string) GetIndexes(group string, name string) []uint64 }
Click to show internal directories.
Click to hide internal directories.