cmd

package
v0.69.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: BSD-3-Clause Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AEnd = ""
	BEnd = ""
	MTU  = links.DefaultLinkMTU
)
View Source
var CACmd = &cobra.Command{
	Use:   "ca",
	Short: "certificate authority operations",
}
View Source
var CACreateCmd = &cobra.Command{
	Use:   "create",
	Short: "create ca certificate and key",
	RunE:  createCA,
}
View Source
var RootCmd = &cobra.Command{
	Use:               "containerlab",
	Short:             "deploy container based lab environments with a user-defined interconnections",
	PersistentPreRunE: preRunFn,
	Aliases:           []string{"clab"},
}

RootCmd represents the base command when called without any subcommands.

Functions

func SignalHandledContext added in v0.69.1

func SignalHandledContext() (context.Context, context.CancelFunc)

SignalHandledContext returns a context that will be canceled if a SIGINT or SIGTERM is received.

Types

type APIServerListItem added in v0.68.0

type APIServerListItem struct {
	Name    string `json:"name"`
	State   string `json:"state"`
	Host    string `json:"host"`
	Port    int    `json:"port"`
	LabsDir string `json:"labs_dir"`
	Runtime string `json:"runtime"`
	Owner   string `json:"owner"`
}

APIServerListItem defines the structure for API server container info in JSON output.

type APIServerNode added in v0.68.0

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

APIServerNode implements runtime.Node interface for API server containers.

func NewAPIServerNode added in v0.68.0

func NewAPIServerNode(name, image, labsDir string, runtime runtime.ContainerRuntime,
	env map[string]string, labels map[string]string,
) (*APIServerNode, error)

func (*APIServerNode) Config added in v0.68.0

func (n *APIServerNode) Config() *types.NodeConfig

func (*APIServerNode) GetEndpoints added in v0.68.0

func (*APIServerNode) GetEndpoints() []links.Endpoint

GetEndpoints implementation for the Node interface.

type GoTTYListItem added in v0.69.0

type GoTTYListItem struct {
	Name        string `json:"name"`
	Network     string `json:"network"`
	State       string `json:"state"`
	IPv4Address string `json:"ipv4_address"`
	Port        int    `json:"port"`
	WebURL      string `json:"web_url"`
	Owner       string `json:"owner"`
}

GoTTYListItem defines the structure for GoTTY container info in JSON output.

type GoTTYNode added in v0.69.0

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

GoTTYNode implements runtime.Node interface for GoTTY containers.

func NewGoTTYNode added in v0.69.0

func NewGoTTYNode(name, image, network string, port int, username, password, shell string, labels map[string]string) *GoTTYNode

NewGoTTYNode creates a new GoTTY node configuration.

func (*GoTTYNode) Config added in v0.69.0

func (n *GoTTYNode) Config() *types.NodeConfig

func (*GoTTYNode) GetEndpoints added in v0.69.0

func (n *GoTTYNode) GetEndpoints() []links.Endpoint

type SSHXListItem added in v0.68.0

type SSHXListItem struct {
	Name        string `json:"name"`
	Network     string `json:"network"`
	State       string `json:"state"`
	IPv4Address string `json:"ipv4_address"`
	Link        string `json:"link"`
	Owner       string `json:"owner"`
}

SSHXListItem defines the structure for SSHX container info in JSON output.

type SSHXNode added in v0.68.0

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

SSHXNode implements runtime.Node interface for SSHX containers.

func NewSSHXNode added in v0.68.0

func NewSSHXNode(name, image, network, labName string, enableReaders bool, labels map[string]string, mountSSH bool) *SSHXNode

NewSSHXNode creates a new SSHX node configuration.

func (*SSHXNode) Config added in v0.68.0

func (n *SSHXNode) Config() *types.NodeConfig

func (*SSHXNode) GetEndpoints added in v0.68.0

func (*SSHXNode) GetEndpoints() []links.Endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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