orchestration

package
v0.0.0-...-84a5298 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPullingLatestImage        = "pullingLatestImage"
	StatusRemovingExistingContainer = "removingExistingContainer"
	StatusCreatingContainer         = "creatingContainer"
	StatusPreparingConfigScripts    = "preparingConfigScripts"
)

Variables

This section is empty.

Functions

func GetConfigScriptStatus

func GetConfigScriptStatus(configScriptName string) string

Types

type Instance

type Instance struct {
	Name   string
	Ports  []Port
	Status string
}

type InstanceAuthentication

type InstanceAuthentication struct {
	RootPassword string
	UserPassword string
}

type InstanceContainerOptions

type InstanceContainerOptions struct {
	StartPort       int32
	PullLatestImage bool
	Recreate        bool
	Isolate         bool
	Privileged      bool
}

type InstanceOptions

type InstanceOptions struct {
	UserName     string
	UserEmail    string
	UserFullName string
	SSHKeyURL    string

	AdditionalIPs     []string
	AdditionalDomains []string

	EnabledModules  []string
	EnabledServices []string
}

type InstanceRemovalOptions

type InstanceRemovalOptions struct {
	Customizations bool
	DEBCache       bool
	Preferences    bool
	UserData       bool
	Transfer       bool
}

type InstancesManager

type InstancesManager struct {
	// contains filtered or unexported fields
}

func NewInstancesManager

func NewInstancesManager(docker *client.Client) *InstancesManager

func (*InstancesManager) AddSSHKey

func (m *InstancesManager) AddSSHKey(ctx context.Context, instanceName string, sshKey string) error

func (*InstancesManager) ApplyInstance

func (m *InstancesManager) ApplyInstance(ctx context.Context, cancel func(error), instanceName string, stdoutChan, stderrChan chan []byte, statusChan chan string, flags InstanceContainerOptions, auth InstanceAuthentication, opts InstanceOptions)

func (*InstancesManager) GetCACert

func (m *InstancesManager) GetCACert(ctx context.Context) (string, error)

func (*InstancesManager) GetInstanceConfig

func (m *InstancesManager) GetInstanceConfig(ctx context.Context, instanceName string) (InstanceOptions, error)

func (*InstancesManager) GetInstances

func (m *InstancesManager) GetInstances(ctx context.Context) ([]Instance, error)

func (*InstancesManager) GetLogs

func (m *InstancesManager) GetLogs(ctx context.Context, cancel func(error), instanceName string, stdoutChan, stderrChan chan []byte)

func (*InstancesManager) GetSSHKeys

func (m *InstancesManager) GetSSHKeys(ctx context.Context, instanceName string) ([]string, error)

func (*InstancesManager) GetShell

func (m *InstancesManager) GetShell(ctx context.Context, cancel func(error), instanceName string, stdinChan, stdoutChan, stderrChan chan []byte)

func (*InstancesManager) RemoveInstance

func (m *InstancesManager) RemoveInstance(ctx context.Context, instanceName string, options InstanceRemovalOptions, skipLock bool) error

func (*InstancesManager) RemoveSSHKey

func (m *InstancesManager) RemoveSSHKey(ctx context.Context, instanceName string, hash string) (string, error)

func (*InstancesManager) ResetCA

func (m *InstancesManager) ResetCA(ctx context.Context) error

func (*InstancesManager) RestartInstance

func (m *InstancesManager) RestartInstance(ctx context.Context, instanceName string) error

func (*InstancesManager) StartInstance

func (m *InstancesManager) StartInstance(ctx context.Context, instanceName string, skipLock bool) error

func (*InstancesManager) StopInstance

func (m *InstancesManager) StopInstance(ctx context.Context, instanceName string) error

type Port

type Port struct {
	Service string
	Port    int32
}

Jump to

Keyboard shortcuts

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