Documentation ¶
Overview ¶
Package talos provides helpers for accessing Talos Machine API.
Index ¶
- type Client
- func (c *Client) Invoke(ctx context.Context, method string, args any, reply any, ...) error
- func (c *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, ...) (grpc.ClientStream, error)
- func (c *Client) WithCluster(clusterName string) *Client
- func (c *Client) WithNodes(nodes ...string) *Client
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 ¶
WithCluster adds clusterName to the request metadata.
Click to show internal directories.
Click to hide internal directories.