Categorygithub.com/skiff-sh/serverapp
modulepackage
0.0.0-20241223210610-75f704a4a2d6
Repository: https://github.com/skiff-sh/serverapp.git
Documentation: pkg.go.dev

# README

serverapp

Opinionated way Skiff creates and configures server applications

# Functions

ContextMutatorServerInterceptors allows for context mutation e.g.
DefaultClientInterceptors instantiate the default interceptors for a client.
DefaultDialOpts returns grpc.DialOption that should be applied to all clients.
DefaultServerInterceptors is a convenience func for default server interceptors.
IsReady uses the health check API to see if a gRPC service is ready.
LoggingClientInterceptors instantiate the logging client-side interceptors.
LoggingServerInterceptors provide interceptors for logging the start and end of a call.
MetricsClientInterceptors instantiate the client metrics interceptors.
MetricsServerInterceptors generates metrics for every request received.
New opinionated constructor for a grpc.Server.
NewClientFactory constructs a new ClientFactory.
NewPanicCounterMetric counter for panics during gRPC requests.
RecoveryServerInterceptors handles recovery in the case of a panic.
SlogLogger configures a logger interceptor using https://github.com/grpc-ecosystem/go-grpc-middleware/blob/main/interceptors/logging/examples/slog/example_test.go as the example.
WaitUntilReady waits until the gRPC service is ready by calling IsReady.

# Variables

DefaultHistoBuckets default histogram buckets in seconds.

# Structs

HealthCheck basic controller to handle health checks.

# Interfaces

ClientConn a wrapper interface to represent a GRPC connection.
ClientFactory creates GRPC connections.

# Type aliases

ContextMutator mutates a context for a gRPC request.