Documentation ¶
Index ¶
- Variables
- type ContainerConfig
- type ContainerProps
- type Deployment
- type DeploymentsRepositoryDB
- type DeploymentsRuntimeDocker
- func (dr *DeploymentsRuntimeDocker) DeleteContainer(id string) error
- func (dr *DeploymentsRuntimeDocker) GetContainer(id string) (types.Container, error)
- func (dr *DeploymentsRuntimeDocker) RunContainer(props ContainerProps) (container.ContainerCreateCreatedBody, error)
- func (dr *DeploymentsRuntimeDocker) Stop(id string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorDeploymentNotFound = errors.New("deployment not found")
Functions ¶
This section is empty.
Types ¶
type ContainerConfig ¶
type ContainerConfig struct { Image string `json:"image"` Name string `json:"name"` ContainerNet struct { Port string `json:"port"` Proto string `json:"proto"` } `json:"containerNet"` HostNet struct { IP string `json:"ip"` PortFirst int `json:"portFirst"` Proto string `json:"proto"` } `json:"hostNet"` Replicas int `json:"replicas"` Command []string `json:"command"` }
type ContainerProps ¶
type Deployment ¶
type Deployment struct { Name string `json:"name"` Config ContainerConfig `json:"config"` Running map[string]container.ContainerCreateCreatedBody `json:"running"` }
type DeploymentsRepositoryDB ¶
type DeploymentsRepositoryDB struct {
// contains filtered or unexported fields
}
func NewDeploymentsRepositoryDB ¶
func NewDeploymentsRepositoryDB(client *bolt.DB) DeploymentsRepositoryDB
func (*DeploymentsRepositoryDB) Delete ¶
func (dr *DeploymentsRepositoryDB) Delete(name string) error
func (*DeploymentsRepositoryDB) Get ¶
func (dr *DeploymentsRepositoryDB) Get(name string) (*Deployment, error)
func (*DeploymentsRepositoryDB) Save ¶
func (dr *DeploymentsRepositoryDB) Save(d Deployment) error
type DeploymentsRuntimeDocker ¶
type DeploymentsRuntimeDocker struct {
// contains filtered or unexported fields
}
func NewDeploymentsRuntime ¶
func NewDeploymentsRuntime(ctx *context.Context) DeploymentsRuntimeDocker
func (*DeploymentsRuntimeDocker) DeleteContainer ¶
func (dr *DeploymentsRuntimeDocker) DeleteContainer(id string) error
Delete Container
func (*DeploymentsRuntimeDocker) GetContainer ¶
func (dr *DeploymentsRuntimeDocker) GetContainer(id string) (types.Container, error)
func (*DeploymentsRuntimeDocker) RunContainer ¶
func (dr *DeploymentsRuntimeDocker) RunContainer(props ContainerProps) (container.ContainerCreateCreatedBody, error)
Run Container
Click to show internal directories.
Click to hide internal directories.