boxpkg

package
v1.1.4-nightly Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: AGPL-3.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CONTAINER_PORT = "1729"
	VpnImageName = "linuxserver/wireguard:latest"

	CONT_PATH_KEY           = "kl.container.path"
	CONT_NAME_KEY           = "kl.container.name"
	CONT_MARK_KEY           = "kl.container"
	CONT_VPN_MARK_KEY       = "kl.container.vpn"
	CONT_WORKSPACE_MARK_KEY = "kl.container.workspace"
	SSH_PORT_KEY            = "kl.container.ssh.port"
	KLCONFIG_HASH_KEY       = "kl.container.klconfig.hash"
)
View Source
const (
	NO_RUNNING_CONTAINERS = "no container running"
)

Variables

View Source
var NotFoundErr = functions.Error("container not found")
View Source
var UserCanceled = fn.Errorf("user canceled")

Functions

func GenerateConnectionScript added in v1.1.0

func GenerateConnectionScript(clusterConfig *fileclient.TeamClusterConfig) (string, error)

Types

type BoxClient added in v1.1.0

type BoxClient interface {
	SyncProxy(config ProxyConfig) error
	Stop() error
	Restart() error
	Start() error
	Ssh() error
	Reload() error
	PrintBoxes([]Cntr) error
	ListAllBoxes() ([]Cntr, error)
	Info() error
	Exec([]string, io.Writer) error

	ConfirmBoxRestart() error
	StartWgContainer() error
}

func NewClient

func NewClient(cmd *cobra.Command, args []string) (BoxClient, error)

type Cntr

type Cntr struct {
	Name   string
	Labels map[string]string
	State  ContState
}

type ContState

type ContState string
const (
	ContStateExited  ContState = "exited"
	ContStateCreated ContState = "created"
)

type Container

type Container struct {
	Name string
	Path string
}

type ContainerConfig

type ContainerConfig struct {
	Name string
	// contains filtered or unexported fields
}

type ProxyConfig added in v1.1.0

type ProxyConfig struct {
	// TargetContainerId   string
	TargetContainerPath string
	ExposedPorts        []int
}

func (*ProxyConfig) GetHash added in v1.1.0

func (c *ProxyConfig) GetHash() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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