Documentation
¶
Overview ¶
SPDX-FileCopyrightText: (C) 2025 Intel Corporation SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func CheckIfChanged(latestCfg *pb.GetTelemetryConfigResponse) ([4]bool, [4]bool)
- func GetConfig(ctx context.Context, cli pb.TelemetryMgrClient, nodeId string, ...) (*pb.GetTelemetryConfigResponse, error)
- func WithNetworkDialer(serverAddr string) func(*Client)
- type Client
- type ProfileGroup
Constants ¶
View Source
const ( MetricHost int = 0 MetricCluster int = 1 LogHost int = 2 LogCluster int = 3 )
Define enum constants with specific values
View Source
const CONN_TIMEOUT = 5 * time.Second
View Source
const NUM_RETRIES = 3
Variables ¶
View Source
var LastProfile []ProfileGroup
View Source
var LastResp *pb.GetTelemetryConfigResponse
Functions ¶
func CheckIfChanged ¶
func CheckIfChanged(latestCfg *pb.GetTelemetryConfigResponse) ([4]bool, [4]bool)
func GetConfig ¶
func GetConfig(ctx context.Context, cli pb.TelemetryMgrClient, nodeId string, jwtTokenPath string) (*pb.GetTelemetryConfigResponse, error)
func WithNetworkDialer ¶
Types ¶
type Client ¶
type Client struct {
ServerAddr string
Dialer grpc.DialOption
Transport grpc.DialOption
GrpcConn *grpc.ClientConn
SouthboundClient pb.TelemetryMgrClient
}
func ConnectToTelemetryManager ¶
func ConnectToTelemetryManager(ctx context.Context, serverAddr string, devMode bool) (*Client, error)
ConnectToTelemetryManager function uses comms API's and the Telemetry Manager address to connect with GRPC the Telemetry Manager server. The function will return the Client struct In case of error the function will print the error message, will sleep for some period time and will try again.
type ProfileGroup ¶
type ProfileGroup struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.