loads

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerDriverID common.LoadDriverID = "container"
View Source
const ProcessDriverID common.LoadDriverID = "process"

Variables

This section is empty.

Functions

func NewContainerDriver added in v0.1.2

func NewContainerDriver(c any) (common.LoadDriver, error)

func NewProcessDriver added in v0.1.2

func NewProcessDriver(c any) (common.LoadDriver, error)

Types

type ContainerConfig

type ContainerConfig struct {
	Image       string             `json:"image"`
	Env         []string           `json:"env"`
	Quotas      *dto.Quotas        `json:"quotas"`
	MountVolume *[]dto.MountVolume `json:"mount_volume,omitempty"`
	BindMounts  []dto.BindMount    `json:"bind_mounts,omitempty"`
	Network     *dto.NetworkConfig `json:"network,omitempty"`
	Entrypoint  *string            `json:"entrypoint,omitempty"`
	Args        []string           `json:"args,omitempty"`
	WorkingDir  *string            `json:"working_dir,omitempty"`
}

type ContainerDriver

type ContainerDriver struct {
	Config ContainerConfig
}

func (*ContainerDriver) Deprovision added in v0.1.2

func (c *ContainerDriver) Deprovision(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ContainerDriver) DriverInfo

func (c *ContainerDriver) DriverInfo() common.LoadDriverInfo

func (*ContainerDriver) GetDriverConfig

func (c *ContainerDriver) GetDriverConfig() common.LoadDriverConfig

func (*ContainerDriver) GetLoadDriverID

func (c *ContainerDriver) GetLoadDriverID() common.LoadDriverID

func (*ContainerDriver) Kill added in v0.1.2

func (c *ContainerDriver) Kill(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ContainerDriver) MarshalJSON

func (c *ContainerDriver) MarshalJSON() ([]byte, error)

func (*ContainerDriver) Provision added in v0.1.2

func (c *ContainerDriver) Provision(nodeDriver common.NodeDriver, repository common.DeploymentsRepository, loadName string) (common.DeploymentID, error)

func (*ContainerDriver) ReadStderr

func (c *ContainerDriver) ReadStderr(repository common.DeploymentsRepository, deployment common.Deployment, offset int64) ([]byte, int64, error)

func (*ContainerDriver) ReadStdout

func (c *ContainerDriver) ReadStdout(repository common.DeploymentsRepository, deployment common.Deployment, offset int64) ([]byte, int64, error)

func (*ContainerDriver) Start added in v0.1.5

func (c *ContainerDriver) Start(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ContainerDriver) Stop added in v0.1.2

func (c *ContainerDriver) Stop(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ContainerDriver) StreamStderr

func (c *ContainerDriver) StreamStderr(repository common.DeploymentsRepository, deployment common.Deployment, w io.Writer) error

func (*ContainerDriver) StreamStdout

func (c *ContainerDriver) StreamStdout(repository common.DeploymentsRepository, deployment common.Deployment, w io.Writer) error

func (*ContainerDriver) UnmarshalJSON

func (c *ContainerDriver) UnmarshalJSON(data []byte) error

func (*ContainerDriver) UpdateStatus added in v0.1.2

type ContainerEntryMetadata

type ContainerEntryMetadata struct {
	ContainerName string  `json:"container_name"`
	IPAddress     *net.IP `json:"ip_address,omitempty"`
	GWAddress     *net.IP `json:"gw_address,omitempty"`
	StdoutPath    string  `json:"stdout_path,omitempty"`
	StderrPath    string  `json:"stderr_path,omitempty"`
}

type ProcessConfig

type ProcessConfig struct {
	StartCmd       string  `json:"start_cmd"`
	StartArgs      *string `json:"start_args,omitempty"`
	WorkingDir     *string `json:"working_dir,omitempty"`
	StopSignal     *string `json:"stop_signal,omitempty"`
	UseProcessName *bool   `json:"use_process_name,omitempty"`
}

type ProcessDriver

type ProcessDriver struct {
	StopSignal *int
	Config     ProcessConfig
}

func (*ProcessDriver) Deprovision added in v0.1.2

func (p *ProcessDriver) Deprovision(repository common.DeploymentsRepository, deployment common.Deployment) error

func (ProcessDriver) DriverInfo

func (c ProcessDriver) DriverInfo() common.LoadDriverInfo

func (*ProcessDriver) GetDriverConfig

func (p *ProcessDriver) GetDriverConfig() common.LoadDriverConfig

func (ProcessDriver) GetLoadDriverID

func (c ProcessDriver) GetLoadDriverID() common.LoadDriverID

func (*ProcessDriver) Kill added in v0.1.2

func (p *ProcessDriver) Kill(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ProcessDriver) MarshalJSON

func (p *ProcessDriver) MarshalJSON() ([]byte, error)

func (*ProcessDriver) Provision added in v0.1.2

func (p *ProcessDriver) Provision(nodeDriver common.NodeDriver, repository common.DeploymentsRepository, loadName string) (common.DeploymentID, error)

func (*ProcessDriver) ReadStderr

func (p *ProcessDriver) ReadStderr(repository common.DeploymentsRepository, deployment common.Deployment, offset int64) ([]byte, int64, error)

func (*ProcessDriver) ReadStdout

func (p *ProcessDriver) ReadStdout(repository common.DeploymentsRepository, deployment common.Deployment, offset int64) ([]byte, int64, error)

func (*ProcessDriver) Start added in v0.1.5

func (p *ProcessDriver) Start(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ProcessDriver) Stop added in v0.1.2

func (p *ProcessDriver) Stop(repository common.DeploymentsRepository, deployment common.Deployment) error

func (*ProcessDriver) StreamStderr

func (p *ProcessDriver) StreamStderr(repository common.DeploymentsRepository, deployment common.Deployment, w io.Writer) error

func (*ProcessDriver) StreamStdout

func (p *ProcessDriver) StreamStdout(repository common.DeploymentsRepository, deployment common.Deployment, w io.Writer) error

func (*ProcessDriver) UnmarshalJSON

func (p *ProcessDriver) UnmarshalJSON(data []byte) error

func (*ProcessDriver) UpdateStatus added in v0.1.2

type ProcessEntryMetadata

type ProcessEntryMetadata struct {
	Pid        int    `json:"pid,omitempty"`
	StdoutPath string `json:"stdout_path,omitempty"`
	StderrPath string `json:"stderr_path,omitempty"`
}

Jump to

Keyboard shortcuts

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