hostmgr_client

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CONN_TIMEOUT = 5 * time.Second
View Source
const NUM_RETRIES = 3

Variables

This section is empty.

Functions

func WithNetworkDialer

func WithNetworkDialer(serverAddr string) func(*Client)

Helper function for dailing to the server.

Types

type Client

type Client struct {
	HostGUID              string
	ServerAddr            string
	Dialer                grpc.DialOption
	Transport             grpc.DialOption
	GrpcConn              *grpc.ClientConn
	InfraSouthboundClient proto.HostmgrClient
}

func ConnectToHostMgr

func ConnectToHostMgr(ctx context.Context, guid string, serverAddr string, tlsConfig *tls.Config) (*Client, error)

func NewClient

func NewClient(guid string, serverAddr string, tlsConfig *tls.Config, options ...func(*Client)) *Client

NewClient creates grpc client to Edge Infrastructure Manager (Hostmgr) southbound API by default it uses tcp network dialer

func (*Client) Connect

func (cli *Client) Connect(ctx context.Context) (err error)

FIXME: SA1019: grpc.DialContext is deprecated: use NewClient instead.

func (*Client) UpdateInstanceStatus

func (cli *Client) UpdateInstanceStatus(ctx context.Context, insState proto.InstanceState, insStatus proto.InstanceStatus, insDetails string) error

UpdateInstanceStatus client method sends UpdateInstanceStateStatusByHostGUIDRequest message to the server & receives UpdateInstanceStateStatusByHostGUIDResponse message

Jump to

Keyboard shortcuts

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