Documentation ¶
Overview ¶
Package types implements type functionality.
Index ¶
- type ContainerCmd
- type ContainerCmder
- type Node
- func (n *Node) Delete(ctx context.Context) error
- func (n *Node) IP(ctx context.Context) (ipv4 string, err error)
- func (n *Node) IsRunning() bool
- func (n *Node) Kill(ctx context.Context, signal string) error
- func (n *Node) Role() (string, error)
- func (n Node) String() string
- func (n *Node) WithStatus(status string) *Node
- func (n *Node) WriteFile(ctx context.Context, dest, content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerCmd ¶
type ContainerCmd struct {
// contains filtered or unexported fields
}
ContainerCmd implements exec.Cmd for docker containers.
func (*ContainerCmd) Run ¶
func (c *ContainerCmd) Run(ctx context.Context) error
Run will run a configured ContainerCmd inside a container instance.
func (*ContainerCmd) SetEnv ¶
func (c *ContainerCmd) SetEnv(env ...string)
SetEnv sets environment variable settings to define in a node.
func (*ContainerCmd) SetStderr ¶
func (c *ContainerCmd) SetStderr(w io.Writer)
SetStderr sets the io.Writer to use for stderr output.
func (*ContainerCmd) SetStdin ¶
func (c *ContainerCmd) SetStdin(r io.Reader)
SetStdin sets the io.Reader to use for receiving stdin input.
func (*ContainerCmd) SetStdout ¶
func (c *ContainerCmd) SetStdout(w io.Writer)
SetStdout sets the io.Writer to use for stdout output.
type ContainerCmder ¶
type ContainerCmder struct {
// contains filtered or unexported fields
}
ContainerCmder is used for running commands within a container.
func GetContainerCmder ¶
func GetContainerCmder(containerNameOrID string) *ContainerCmder
GetContainerCmder gets a new ContainerCmder instance used for running commands within a container.
func (*ContainerCmder) Command ¶
func (c *ContainerCmder) Command(command string, args ...string) *ContainerCmd
Command is the command to be run in a container.
type Node ¶
type Node struct { Name string ClusterRole string InternalIP string Image string Commander *ContainerCmder // contains filtered or unexported fields }
Node can be thought of as a logical component of Kubernetes. A node is either a control plane node, a worker node, or a load balancer node.
func (*Node) WithStatus ¶
WithStatus sets the status of the container and returns the node.