talos

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package talos implements the connector that can pull data from the Talos controller runtime.

Index

Constants

This section is empty.

Variables

View Source
var Name = common.Runtime_Talos.String()

Name talos runtime string id.

Functions

func CurrentContext added in v0.2.1

func CurrentContext() (string, error)

CurrentContext returns current local context.

func GetContexts added in v0.2.1

func GetContexts() ([]*rpc.Context, error)

GetContexts returns all locally defined contexts in the talosconfig.

func WithNodes

func WithNodes(ctx context.Context, context *common.Context) context.Context

WithNodes returns context with nodes if they are defined.

Types

type Runtime

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

Runtime implements runtime.Runtime for Talos resources.

func New

func New() *Runtime

New creates a new Talos runtime.

func (*Runtime) AddContext

func (r *Runtime) AddContext(id string, data []byte) error

AddContext implements runtime.Runtime.

func (*Runtime) Create

func (r *Runtime) Create(ctx context.Context, resource cosiresource.Resource, setters ...runtime.QueryOption) error

Create implements runtime.Runtime.

func (*Runtime) Delete

func (r *Runtime) Delete(ctx context.Context, setters ...runtime.QueryOption) error

Delete implements runtime.Runtime.

func (*Runtime) Get

func (r *Runtime) Get(ctx context.Context, setters ...runtime.QueryOption) (interface{}, error)

Get implements runtime.Runtime.

func (*Runtime) GetClient

func (r *Runtime) GetClient(ctx context.Context, context *common.Context) (*client.Client, error)

GetClient returns talos client for the context name or CAPI cluster.

func (*Runtime) GetContext

func (r *Runtime) GetContext(ctx context.Context, context *common.Context, cluster *common.Cluster) ([]byte, error)

GetContext implements runtime.Runtime.

func (*Runtime) GetKubeconfig added in v0.2.1

func (r *Runtime) GetKubeconfig(ctx context.Context, context *common.Context) (*rest.Config, error)

GetKubeconfig returns kubeconfig for the cluster.

func (*Runtime) List

func (r *Runtime) List(ctx context.Context, setters ...runtime.QueryOption) ([]interface{}, error)

List implements runtime.Runtime.

func (*Runtime) Update

func (r *Runtime) Update(ctx context.Context, resource cosiresource.Resource, setters ...runtime.QueryOption) error

Update implements runtime.Runtime.

func (*Runtime) Watch

func (r *Runtime) Watch(ctx context.Context, request *message.WatchSpec, events chan runtime.Event) error

Watch implements runtime.Runtime.

type Watch

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

Watch watches Talos resources.

Jump to

Keyboard shortcuts

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