proxy

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package proxy provides a client for communicating with the FODC Proxy.

Package proxy provides connection management for the FODC Proxy client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client manages connection and communication with the FODC Proxy.

func NewClient

func NewClient(
	proxyAddr string,
	nodeRole string,
	podName string,
	containerNames []string,
	labels map[string]string,
	heartbeatInterval time.Duration,
	reconnectInterval time.Duration,
	flightRecorder *flightrecorder.FlightRecorder,
	clusterCollector *cluster.Collector,
	lifecycleCollector *lifecycle.Collector,
	logger *logger.Logger,
) *Client

NewClient creates a new Client instance.

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

Connect establishes a gRPC connection to Proxy.

func (*Client) Disconnect

func (c *Client) Disconnect() error

Disconnect closes connection to Proxy.

func (*Client) RetrieveAndSendMetrics

func (c *Client) RetrieveAndSendMetrics(_ context.Context, filter *MetricsRequestFilter) error

RetrieveAndSendMetrics retrieves metrics from Flight Recorder when requested by Proxy.

func (*Client) SendHeartbeat

func (c *Client) SendHeartbeat(_ context.Context) error

SendHeartbeat sends heartbeat to Proxy.

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

Start starts the proxy client with automatic reconnection.

func (*Client) StartClusterStateStream

func (c *Client) StartClusterStateStream(ctx context.Context) error

StartClusterStateStream establishes bi-directional cluster state stream with Proxy.

func (*Client) StartConnManager

func (c *Client) StartConnManager(ctx context.Context)

StartConnManager is useful for tests or scenarios where you want to manually control connection lifecycle.

func (*Client) StartLifecycleStream added in v0.10.1

func (c *Client) StartLifecycleStream(ctx context.Context) error

StartLifecycleStream establishes bi-directional lifecycle stream with Proxy.

func (*Client) StartMetricsStream

func (c *Client) StartMetricsStream(ctx context.Context) error

StartMetricsStream establishes bi-directional metrics stream with Proxy.

func (*Client) StartRegistrationStream

func (c *Client) StartRegistrationStream(ctx context.Context) error

StartRegistrationStream establishes bi-directional registration stream with Proxy.

type MetricsRequestFilter

type MetricsRequestFilter struct {
	StartTime *time.Time
	EndTime   *time.Time
}

MetricsRequestFilter defines filters for metrics requests.

Jump to

Keyboard shortcuts

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