platforms

package
v0.0.106 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: GPL-3.0 Imports: 18 Imported by: 2

Documentation

Index

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) AttachToNetworks

func (c *Container) AttachToNetworks(agentContainerName string) error

func (*Container) Delete

func (c *Container) Delete() error

func (*Container) Exec

func (c *Container) Exec(command []string) types.ExecResult

func (*Container) Get

func (c *Container) Get() (*TDTypes.Container, error)

func (*Container) GetAgent added in v0.0.69

func (c *Container) GetAgent() string

func (*Container) GetDefinition

func (c *Container) GetDefinition() v1.ContainerDefinition

func (*Container) GetDomain

func (c *Container) GetDomain(network string) string

func (*Container) GetGeneratedName

func (c *Container) GetGeneratedName() string

func (*Container) GetGroup

func (c *Container) GetGroup() string

func (*Container) GetGroupIdentifier

func (c *Container) GetGroupIdentifier() string

func (*Container) GetHeadlessDomain

func (c *Container) GetHeadlessDomain(network string) string

func (*Container) GetLabels

func (c *Container) GetLabels() map[string]string

func (*Container) GetName

func (c *Container) GetName() string

func (*Container) GetRuntime

func (c *Container) GetRuntime() *types.Runtime

func (*Container) GetStatus

func (c *Container) GetStatus() *status.Status

func (*Container) IsGhost added in v0.0.69

func (c *Container) IsGhost() bool

func (*Container) Kill added in v0.0.94

func (c *Container) Kill(signal string) error

func (*Container) Prepare

func (c *Container) Prepare(client *client.Http, user *authentication.User) error

func (*Container) Rename

func (c *Container) Rename(newName string) error

func (*Container) Restart

func (c *Container) Restart() error

func (*Container) Run

func (c *Container) Run(config *configuration.Configuration, http *client.Http, records *dns.Records, user *authentication.User) (*TDTypes.Container, error)

func (*Container) SetGhost added in v0.0.69

func (c *Container) SetGhost(ghost bool)

func (*Container) Start

func (c *Container) Start() error

func (*Container) Stop

func (c *Container) Stop(signal string) error

func (*Container) ToJson added in v0.0.97

func (c *Container) ToJson() ([]byte, error)

func (*Container) UpdateDns

func (c *Container) UpdateDns(cache *dns.Records)

type General

type General struct {
	Labels  map[string]string
	Runtime *types.Runtime
	Status  *status.Status
}

type IContainer

type IContainer interface {
	Start() error
	Stop(signal string) error
	Kill(signal string) error
	Restart() error
	Delete() error
	Rename(newName string) error
	Exec(command []string) types.ExecResult

	Get() (*TDTypes.Container, error)
	Run(*configuration.Configuration, *client.Http, *dns.Records, *authentication.User) (*TDTypes.Container, error)
	Prepare(client *client.Http, user *authentication.User) error

	AttachToNetworks(string) error
	UpdateDns(dnsCache *dns.Records)

	GetRuntime() *types.Runtime
	GetStatus() *status.Status
	GetAgent() string

	GetDefinition() v1.ContainerDefinition
	GetLabels() map[string]string
	GetGeneratedName() string
	GetName() string
	GetGroup() string
	GetGroupIdentifier() string

	GetDomain(network string) string
	GetHeadlessDomain(network string) string

	IsGhost() bool
	SetGhost(bool)

	ToJson() ([]byte, error)
}

func New

func New(platform string, name string, config *configuration.Configuration, ChangeC chan distributed.Container, definition *v1.ContainerDefinition) (IContainer, error)

func NewGhost added in v0.0.69

func NewGhost(state map[string]interface{}) (IContainer, error)

type IPlatform

type IPlatform interface {
	Start() error
	Stop(signal string) error
	Kill(signal string) error
	Restart() error
	Delete() error
	Rename(newName string) error
	Exec(command []string) types.ExecResult

	Get() (*TDTypes.Container, error)
	Run(*configuration.Configuration, *client.Http, *dns.Records, *authentication.User) (*TDTypes.Container, error)
	Prepare(client *client.Http, user *authentication.User, runtime *types.Runtime) error

	AttachToNetworks(string) error
	UpdateDns(dnsCache *dns.Records)
	GenerateLabels() map[string]string

	GetDefinition() v1.ContainerDefinition
	GetGeneratedName() string
	GetName() string
	GetGroup() string
	GetGroupIdentifier() string
	GetDomain(networkName string) string
	GetHeadlessDomain(networkName string) string

	ToJson() ([]byte, error)
}

Directories

Path Synopsis
engines

Jump to

Keyboard shortcuts

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