stack

package
v0.0.0-...-2a2c708 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForHealthy

func WaitForHealthy(ctx context.Context, fw *firewall.FirewallContainer, timeout time.Duration) error

WaitForHealthy waits for the firewall container to become healthy. It polls the health check at intervals until the timeout is reached.

Types

type Stack

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

Stack manages the 4-resource sandbox stack: - Sessions volume (durable) - Firewall container (nftables + CoreDNS — traffic filtering) - Proxy container (nginx — host→agent port forwarding) - Agent container (opencode)

func New

func New(cli *client.Client, hash, path string, cfg *config.Config) *Stack

New creates a new stack manager.

func (*Stack) Create

func (s *Stack) Create(ctx context.Context, image string) error

Create creates the full stack without starting containers.

func (*Stack) Exists

func (s *Stack) Exists(ctx context.Context) (bool, error)

Exists checks if the stack exists.

func (*Stack) GetPort

func (s *Stack) GetPort(ctx context.Context) (string, error)

GetPort returns the published port for the proxy container.

func (*Stack) Remove

func (s *Stack) Remove(ctx context.Context, force bool, purge bool) error

Remove removes containers + network, keeps volume unless purge=true.

func (*Stack) Start

func (s *Stack) Start(ctx context.Context) error

Start starts the full stack with health checks.

func (*Stack) Status

func (s *Stack) Status(ctx context.Context) (*StackStatus, error)

Status returns the status of all stack resources.

func (*Stack) Stop

func (s *Stack) Stop(ctx context.Context, timeout int) error

Stop stops all containers, keeps volume.

type StackStatus

type StackStatus struct {
	Agent    string
	Firewall string
	Proxy    string
	Network  string
}

StackStatus holds the status of all stack resources.

Jump to

Keyboard shortcuts

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