platforms

package
v0.0.84 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: GPL-3.0 Imports: 15 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
	// contains filtered or unexported fields
}

func (Container) AttachToNetworks

func (c Container) AttachToNetworks() 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) 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() bool

func (Container) Run

func (c Container) Run(environment *configuration.Environment, 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() bool

func (Container) Stop

func (c Container) Stop() bool

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() bool
	Stop() bool
	Restart() bool
	Delete() error
	Rename(newName string) error
	Exec(command []string) types.ExecResult

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

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

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() bool
	Stop() bool
	Restart() bool
	Delete() error
	Rename(newName string) error
	Exec(command []string) types.ExecResult

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

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

Directories

Path Synopsis
engines

Jump to

Keyboard shortcuts

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