grpc

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package grpc provides Chronos's gRPC transport layer. It mirrors the HTTP REST surface: ingest observations and query signals. The gRPC server shares the same domain ports (EntityStateRepository, SignalRepository) as the HTTP server; it is a thin transport adapter only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	chronosv1.UnimplementedChronosServiceServer
	// contains filtered or unexported fields
}

Server implements chronosv1.ChronosServiceServer.

func NewServer

func NewServer(states ports.EntityStateRepository, signals ports.SignalRepository, metrics *observability.Metrics, logger *slog.Logger) *Server

NewServer wires a gRPC server. Pass slog.Default() for the logger if the caller has no preference. metrics may be nil.

func (*Server) GetSignal

func (s *Server) GetSignal(ctx context.Context, req *chronosv1.GetSignalRequest) (*chronosv1.Signal, error)

GetSignal returns a single signal by ID.

func (*Server) Ingest

Ingest persists a single EntityState observation.

func (*Server) ListSignals

ListSignals returns signals matching the provided filter.

Jump to

Keyboard shortcuts

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