Documentation
¶
Index ¶
- type Config
- type GRPCMetrics
- type GRPCRegistrar
- type MetricsContributor
- type Server
- func (*Server[T]) BuildConfig() (app.Materializer, error)
- func (t *Server[T]) Close(ctx context.Context) error
- func (r *Server[T]) Deps() []any
- func (t *Server[T]) HealthCheck(_ context.Context) error
- func (r *Server[T]) Inject(args []any)
- func (t *Server[T]) ProbeReady(ctx context.Context) error
- func (t *Server[T]) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCMetrics ¶
type GRPCMetrics struct {
// contains filtered or unexported fields
}
GRPCMetrics is a singleton pool resource: contributor + shared prometheus interceptors for all srv-grpc servers.
func (*GRPCMetrics) InitializeMetrics ¶
func (m *GRPCMetrics) InitializeMetrics(s *grpc.Server)
func (*GRPCMetrics) RegisterMetrics ¶
func (m *GRPCMetrics) RegisterMetrics(reg *prom.Registry) error
func (*GRPCMetrics) StreamServerInterceptor ¶
func (m *GRPCMetrics) StreamServerInterceptor() grpc.StreamServerInterceptor
func (*GRPCMetrics) UnaryServerInterceptor ¶
func (m *GRPCMetrics) UnaryServerInterceptor() grpc.UnaryServerInterceptor
type GRPCRegistrar ¶
GRPCRegistrar registers service implementations on a gRPC server.
type MetricsContributor ¶
MetricsContributor registers gRPC metrics collectors into a shared registry. Same method signature as github.com/omcrgnt/ops/metrics.MetricsContributor.
type Server ¶
type Server[T GRPCRegistrar] struct { // contains filtered or unexported fields }
Server is the gRPC server resource bound to handler type T. Catalog field: *Server[T] (Configurable); materialized *Server[T] is the runtime instance after Config.Build. Runtime methods: Start, Close, HealthCheck, ProbeReady.
func (*Server[T]) BuildConfig ¶
func (*Server[T]) BuildConfig() (app.Materializer, error)
func (*Server[T]) ProbeReady ¶
ProbeReady reports traffic readiness (SDI duck typing; no ops import). v1: same as HealthCheck — non-nil if Serve failed after Start.