talos

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package talos provides helpers for accessing Talos Machine API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	machine.MachineServiceClient
	// contains filtered or unexported fields
}

Client adds runtime, cluster and nodes metadata to all gRPC calls.

func NewClient

func NewClient(conn grpc.ClientConnInterface) *Client

NewClient wraps gRPC connection interface which adds nodes, cluster name to each request.

func (*Client) Invoke

func (c *Client) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error

Invoke performs a unary RPC and returns after the response is received into reply.

func (*Client) NewStream

func (c *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

NewStream begins a streaming RPC.

func (*Client) WithCluster

func (c *Client) WithCluster(clusterName string) *Client

WithCluster adds clusterName to the request metadata.

func (*Client) WithNodes

func (c *Client) WithNodes(nodes ...string) *Client

WithNodes adds nodes to the request metadata.

Jump to

Keyboard shortcuts

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