telemetry_dialout

package
v0.0.0-...-1510907 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Unknown is an unknown report and should always be treated as an error.
	Unknown reportType = iota
	// Once will perform a Once report against the agent.
	Once
	// Poll will perform a Periodic report against the agent.
	Periodic
	// Stream will perform a Streaming report against the agent.
	Stream
)

Variables

View Source
var (

	// For finding clientSubscription quickly
	ClientSubscriptionNameMap = make(map[string]*clientSubscription)

	// map for storing name of clientSubscription which are users of the destination group
	DestGrp2ClientSubMap = make(map[string][]string)
)

Functions

func DialOutRun

func DialOutRun(ctx context.Context, ccfg *ClientConfig) error

read configDB data for telemetry client and start publishing service for client subscription

func NewReportType

func NewReportType(s string) reportType

NewType returns a new reportType based on the provided string.

Types

type Client

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

Client handles execution of the telemetry publish service.

func (*Client) Close

func (c *Client) Close() error

Closing of client queue is triggered upon end of stream receive or stream error or fatal error of any client go routine . it will cause cancle of client context and exit of the send goroutines.

type ClientConfig

type ClientConfig struct {
	SrcIp          string
	RetryInterval  time.Duration
	Encoding       gpb.Encoding
	Unidirectional bool        // by default, no reponse from remote server
	TLS            *tls.Config // TLS config to use when connecting to target. Optional.
	RedisConType   string      // "unix"  or "tcp"
}

Global config for all clients

type Destination

type Destination struct {
	Addrs string
}

func (Destination) Validate

func (d Destination) Validate() error

Jump to

Keyboard shortcuts

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