grpc

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package grpc provides functionality for the gRPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FODCService

type FODCService struct {
	fodcv1.UnimplementedFODCServiceServer
	// contains filtered or unexported fields
}

FODCService implements the FODC gRPC service.

func NewFODCService

func NewFODCService(
	registry *registry.AgentRegistry,
	metricsAggregator *metrics.Aggregator,
	clusterStateManager *cluster.Manager,
	lifecycleManager *lifecycle.Manager,
	crashDiagnosticsAggregator *diagnostics.Aggregator,
	pressureAggregator *pressure.Aggregator,
	logger *logger.Logger,
	heartbeatInterval time.Duration,
) *FODCService

NewFODCService creates a new FODCService instance.

func (*FODCService) CollectList added in v0.11.0

func (s *FODCService) CollectList(agentIDs []string) <-chan struct{}

CollectList sends a list_profiles command (under one request id) to every agent and returns a channel closed once each successfully-contacted agent has reported ListComplete. Agents that cannot be reached are dropped immediately so they never hold the channel open.

func (*FODCService) FetchPressureProfile added in v0.11.0

func (s *FODCService) FetchPressureProfile(ctx context.Context, agentID string, fetch *fodcv1.FetchPressureProfile, onChunk func([]byte) error) error

FetchPressureProfile streams one profile's bytes from an agent, invoking onChunk for each data slice. Only one fetch per agent runs at a time so a slow download never head- of-line blocks list metadata.

func (*FODCService) FetchSchemaRegistry added in v0.11.0

func (s *FODCService) FetchSchemaRegistry(ctx context.Context, agentID string) ([]*fodcv1.SchemaRegistryGroup, error)

FetchSchemaRegistry asks the given agent to read the authoritative registry and returns its per-group fingerprints. The lifecycle manager calls it on the one agent it selects by role, so the registry is read once per collection cycle.

func (*FODCService) HasClusterStateStream

func (s *FODCService) HasClusterStateStream(agentID string) bool

HasClusterStateStream reports whether the given agent currently has a cluster topology stream.

func (*FODCService) HasCrashDiagnosticsStream added in v0.11.0

func (s *FODCService) HasCrashDiagnosticsStream(agentID string) bool

HasCrashDiagnosticsStream reports whether the given agent has a crash diagnostics stream.

func (*FODCService) HasLifecycleStream added in v0.10.1

func (s *FODCService) HasLifecycleStream(agentID string) bool

HasLifecycleStream reports whether the given agent currently has a lifecycle stream.

func (*FODCService) HasPressureProfilesStream added in v0.11.0

func (s *FODCService) HasPressureProfilesStream(agentID string) bool

HasPressureProfilesStream reports whether the given agent currently has a pressure profiles stream.

func (*FODCService) RegisterAgent

func (s *FODCService) RegisterAgent(stream fodcv1.FODCService_RegisterAgentServer) error

RegisterAgent handles bi-directional agent registration stream.

func (*FODCService) RequestClusterData

func (s *FODCService) RequestClusterData(agentID string) error

RequestClusterData requests cluster data from an agent via the cluster state stream.

func (*FODCService) RequestDiagnostics added in v0.11.0

func (s *FODCService) RequestDiagnostics(agentID string) error

RequestDiagnostics requests crash diagnostics from an agent via the crash diagnostics stream.

func (*FODCService) RequestLifecycleData added in v0.10.1

func (s *FODCService) RequestLifecycleData(agentID string) error

RequestLifecycleData requests lifecycle data from an agent via the lifecycle stream.

func (*FODCService) RequestMetrics

func (s *FODCService) RequestMetrics(agentID string, startTime, endTime *time.Time) error

RequestMetrics requests metrics from an agent via the metrics stream.

func (*FODCService) StreamClusterTopology

func (s *FODCService) StreamClusterTopology(stream fodcv1.FODCService_StreamClusterTopologyServer) error

StreamClusterTopology handles bi-directional cluster topology streaming.

func (*FODCService) StreamCrashDiagnostics added in v0.11.0

func (s *FODCService) StreamCrashDiagnostics(stream fodcv1.FODCService_StreamCrashDiagnosticsServer) error

StreamCrashDiagnostics handles bi-directional crash diagnostics streaming.

func (*FODCService) StreamLifecycle added in v0.10.1

func (s *FODCService) StreamLifecycle(stream fodcv1.FODCService_StreamLifecycleServer) error

StreamLifecycle handles bi-directional lifecycle data streaming.

func (*FODCService) StreamMetrics

func (s *FODCService) StreamMetrics(stream fodcv1.FODCService_StreamMetricsServer) error

StreamMetrics handles bi-directional metrics streaming.

func (*FODCService) StreamPressureProfiles added in v0.11.0

func (s *FODCService) StreamPressureProfiles(stream fodcv1.FODCService_StreamPressureProfilesServer) error

StreamPressureProfiles handles the bi-directional memory-pressure pprof stream: agents reply to list/fetch commands with metadata records or binary chunks.

func (*FODCService) StreamSchemaRegistry added in v0.11.0

func (s *FODCService) StreamSchemaRegistry(stream fodcv1.FODCService_StreamSchemaRegistryServer) error

StreamSchemaRegistry handles the bi-directional schema registry stream. The agent opens it and blocks; the proxy drives only the one agent it selects, which replies with the authoritative registry fingerprints.

type Server

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

Server wraps the gRPC server.

func NewServer

func NewServer(service *FODCService, listenAddr string, maxMsgSize int, logger *logger.Logger) *Server

NewServer creates a new gRPC server instance.

func (*Server) Start

func (s *Server) Start() error

Start starts the gRPC server.

func (*Server) Stop

func (s *Server) Stop()

Stop gracefully stops the gRPC server.

Jump to

Keyboard shortcuts

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