runtime

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelManaged = "cashpilot.managed"
	LabelService = "cashpilot.service"
	LabelVersion = "cashpilot.version"
	LabelRuntime = "cashpilot.runtime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerInfo

type ContainerInfo struct {
	Slug        string  `json:"slug"`
	ContainerID string  `json:"containerId"`
	Name        string  `json:"name"`
	Image       string  `json:"image"`
	Status      string  `json:"status"`
	CPUPercent  float64 `json:"cpuPercent"`
	MemoryMB    float64 `json:"memoryMb"`
}

type DeploySpec

type DeploySpec struct {
	Slug    string
	Service catalog.Service
	Env     map[string]string
}

type DockerProvider

type DockerProvider struct{}

func NewDockerProvider

func NewDockerProvider() *DockerProvider

func (*DockerProvider) Deploy

func (p *DockerProvider) Deploy(ctx context.Context, spec DeploySpec, progress func(string)) (ContainerInfo, error)

func (*DockerProvider) List

func (p *DockerProvider) List(ctx context.Context) ([]ContainerInfo, error)

func (*DockerProvider) Logs

func (p *DockerProvider) Logs(ctx context.Context, slug string, lines int) (string, error)

func (*DockerProvider) Remove

func (p *DockerProvider) Remove(ctx context.Context, slug string) error

func (*DockerProvider) Restart

func (p *DockerProvider) Restart(ctx context.Context, slug string) error

func (*DockerProvider) Status

func (p *DockerProvider) Status(ctx context.Context) Status

func (*DockerProvider) Stop

func (p *DockerProvider) Stop(ctx context.Context, slug string) error

type InstallGuide

type InstallGuide struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Platforms   []string `json:"platforms"`
	URL         string   `json:"url"`
	Commands    []string `json:"commands"`
	Notes       []string `json:"notes"`
}

func InstallGuides

func InstallGuides() []InstallGuide

type ManagedRuntimePlan

type ManagedRuntimePlan struct {
	Summary   string   `json:"summary"`
	Phases    []string `json:"phases"`
	Risks     []string `json:"risks"`
	Providers []string `json:"providers"`
}

func ManagedRuntimeRoadmap

func ManagedRuntimeRoadmap() ManagedRuntimePlan

type Provider

type Provider interface {
	Status(ctx context.Context) Status
	Deploy(ctx context.Context, spec DeploySpec, progress func(string)) (ContainerInfo, error)
	Stop(ctx context.Context, slug string) error
	Restart(ctx context.Context, slug string) error
	Remove(ctx context.Context, slug string) error
	Logs(ctx context.Context, slug string, lines int) (string, error)
	List(ctx context.Context) ([]ContainerInfo, error)
}

type Status

type Status struct {
	Available bool              `json:"available"`
	Kind      string            `json:"kind"`
	Message   string            `json:"message"`
	Version   string            `json:"version"`
	Context   string            `json:"context"`
	Tools     map[string]string `json:"tools"`
}

Jump to

Keyboard shortcuts

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