domain

package
v0.0.0-...-aa27f07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 ContainerProps struct {
	Image    string
	Port     string   // Container Port
	Name     string   // Container Basename
	HostIP   string   // IP to bind port on
	HostPort string   // Host Port
	Command  []string // Command that runs on container start
	Label    map[string]string
}

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

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

Run Container

func (*DeploymentsRuntimeDocker) Stop

func (dr *DeploymentsRuntimeDocker) Stop(id string, timeout time.Duration) error

Stop Container

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL