Documentation
¶
Overview ¶
Package grpc provides functionality for the gRPC server.
Index ¶
- type FODCService
- func (s *FODCService) CollectList(agentIDs []string) <-chan struct{}
- func (s *FODCService) FetchPressureProfile(ctx context.Context, agentID string, fetch *fodcv1.FetchPressureProfile, ...) error
- func (s *FODCService) FetchSchemaRegistry(ctx context.Context, agentID string) ([]*fodcv1.SchemaRegistryGroup, error)
- func (s *FODCService) HasClusterStateStream(agentID string) bool
- func (s *FODCService) HasCrashDiagnosticsStream(agentID string) bool
- func (s *FODCService) HasLifecycleStream(agentID string) bool
- func (s *FODCService) HasPressureProfilesStream(agentID string) bool
- func (s *FODCService) RegisterAgent(stream fodcv1.FODCService_RegisterAgentServer) error
- func (s *FODCService) RequestClusterData(agentID string) error
- func (s *FODCService) RequestDiagnostics(agentID string) error
- func (s *FODCService) RequestLifecycleData(agentID string) error
- func (s *FODCService) RequestMetrics(agentID string, startTime, endTime *time.Time) error
- func (s *FODCService) StreamClusterTopology(stream fodcv1.FODCService_StreamClusterTopologyServer) error
- func (s *FODCService) StreamCrashDiagnostics(stream fodcv1.FODCService_StreamCrashDiagnosticsServer) error
- func (s *FODCService) StreamLifecycle(stream fodcv1.FODCService_StreamLifecycleServer) error
- func (s *FODCService) StreamMetrics(stream fodcv1.FODCService_StreamMetricsServer) error
- func (s *FODCService) StreamPressureProfiles(stream fodcv1.FODCService_StreamPressureProfilesServer) error
- func (s *FODCService) StreamSchemaRegistry(stream fodcv1.FODCService_StreamSchemaRegistryServer) error
- type Server
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.