k3t

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateData

type CertificateData struct {
	CertificateAuthorityData []byte
	ClientCertificateData    []byte
	ClientKeyData            []byte
}

type Cluster

type Cluster struct {
	Logger zerolog.Logger
	// contains filtered or unexported fields
}

func NewClusterFromEnv

func NewClusterFromEnv(port int) *Cluster

NewClusterFromEnv creates a new k3s single node cluster that listens to localhost:port once started.

func (*Cluster) Start

func (c *Cluster) Start(ctx context.Context) (*CertificateData, error)

Start creates and starts the container containing the single-node cluster. It returns the certificate that can be used to connect to the cluster

func (*Cluster) Stop

func (c *Cluster) Stop(ctx context.Context) error

Stop stops the container and removes it.

Jump to

Keyboard shortcuts

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