types

package
v0.0.0-...-40841d9 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package types implements type functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerCmder

func ContainerCmder(containerNameOrID string) *containerCmder

Types

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 NewNode

func NewNode(name, image, role string) *Node

NewNode returns a Node with defaults.

func (*Node) Delete

func (n *Node) Delete(ctx context.Context) error

Delete removes the container.

func (*Node) IP

func (n *Node) IP(ctx context.Context) (ipv4 string, ipv6 string, err error)

IP gets the docker ipv4 and ipv6 of the node.

func (*Node) IsRunning

func (n *Node) IsRunning() bool

IsRunning returns if the container is running.

func (*Node) Kill

func (n *Node) Kill(ctx context.Context, signal string) error

Kill sends the named signal to the container.

func (*Node) Role

func (n *Node) Role() (string, error)

Role returns the role of the node.

func (*Node) String

func (n *Node) String() string

String returns the name of the node.

func (*Node) WithStatus

func (n *Node) WithStatus(status string) *Node

WithStatus sets the status of the container and returns the node.

func (*Node) WriteFile

func (n *Node) WriteFile(ctx context.Context, dest, content string) error

WriteFile puts a file inside a running container.

Jump to

Keyboard shortcuts

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