loads

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: AGPL-3.0 Imports: 26 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 NewContainerDriverFromConfig

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

func NewProcessDriverFromConfig

func NewProcessDriverFromConfig(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) 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) KillDeployment

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

func (ContainerDriver) MarshalJSON

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

func (ContainerDriver) PlanDeployment

func (c ContainerDriver) PlanDeployment(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) RunDeployment

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

func (ContainerDriver) StopDeployment

func (c ContainerDriver) StopDeployment(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) UnplanDeployment

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

func (ContainerDriver) UpdateDeploymentStatus

func (ContainerDriver) Verify

func (c ContainerDriver) Verify() error

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"`
}

type ProcessDriver

type ProcessDriver struct {
	StopSignal int
	Config     ProcessConfig
}

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

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

func (ProcessDriver) MarshalJSON

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

func (ProcessDriver) PlanDeployment

func (p ProcessDriver) PlanDeployment(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) RunDeployment

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

func (ProcessDriver) StopDeployment

func (p ProcessDriver) StopDeployment(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) UnplanDeployment

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

func (ProcessDriver) UpdateDeploymentStatus

func (ProcessDriver) Verify

func (p ProcessDriver) Verify() error

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