Versions in this module Expand all Collapse all v1 v1.0.14 Nov 18, 2026 Changes in this version + const RecommendedEnvPrefix + const RecommendedHomeDir + const ServerStateClosing + const ServerStateCreated + const ServerStateRunning + const ServerStateStopped + func LoadConfig(cfg string, defaultName string, homeDir string, envPrefix string) + type APIServerBizHooks interface + InitController func(router *gin.Engine, svc Svc) error + InitService func(Store) (Svc, error) + InitStore func() (Store, error) + RegisteredMiddlewares func() (mwv1.Middlewares[Svc], error) + Shutdown func() error + Startup func() error + type APIServerConfig struct + EnableMetrics bool + EnableProfiling bool + HealthCheckPath string + Healthz bool + InsecureServing *InsecureServingInfo + Middlewares []string + Mode string + PingTimeout time.Duration + SecureServing *SecureServingInfo + ShutdownTimeout time.Duration + func NewAPIServerConfig[Svc any, Store any]() *APIServerConfig[Svc, Store] + func (c *APIServerConfig[Svc, Store]) Complete() CompletedAPIServerConfig[Svc, Store] + type CertKey struct + CertFile string + KeyFile string + type CompletedAPIServerConfig struct + func (c CompletedAPIServerConfig[Svc, Store]) NewAPIServer(ctx context.Context, bizHooks APIServerBizHooks[Svc, Store]) *GenericAPIServer[Svc, Store] + type CompletedGRPCServerConfig struct + func (c CompletedGRPCServerConfig[Txp, Ep, Svc, Store]) NewGRPCServer(ctx context.Context, bizHooks GRPCServerBizHooks[Txp, Ep, Svc, Store]) *GenericGRPCServer[Txp, Ep, Svc, Store] + type GRPCServerBizHooks interface + InitEndpoints func(svc Svc) (Ep, error) + InitService func(Store) (Svc, error) + InitStore func() (Store, error) + InitTransport func(eps Ep, chunkSize int) (Txp, error) + RegisteredMiddlewares func() (grpcmwv1.Middlewares[Svc], error) + ServiceRegistrations func(txp Txp) ([]svcregisterv1.ServiceRegistration, error) + Shutdown func() error + Startup func() error + type GRPCServerConfig struct + EnableMetrics bool + EnableProfiling bool + GRPCServing *GRPCServingInfo + Healthz bool + InsecureServing *InsecureServingInfo + Middlewares []string + Namespace string + PingTimeout time.Duration + RA *RAInfo + SecureServing *SecureServingInfo + ShutdownTimeout time.Duration + func NewGRPCServerConfig[Txp, Ep, Svc, Store any]() *GRPCServerConfig[Txp, Ep, Svc, Store] + func (c *GRPCServerConfig[Txp, Ep, Svc, Store]) Complete() CompletedGRPCServerConfig[Txp, Ep, Svc, Store] + type GRPCServingInfo struct + ChunkSize int + RecvTimeoutM int + func NewGRPCServingInfo() *GRPCServingInfo + type GenericAPIServer struct + EnableMetrics bool + HealthCheckPath string + InsecureServingInfo *InsecureServingInfo + PingTimeout time.Duration + Router *gin.Engine + SecureServingInfo *SecureServingInfo + ShutdownTimeout time.Duration + func (s *GenericAPIServer[Svc, Store]) Close() error + func (s *GenericAPIServer[Svc, Store]) PrepareRun() PreparedGenericAPIServer + type GenericGRPCServer struct + ChunkSize int + InsecureServingInfo *InsecureServingInfo + PingTimeout time.Duration + RAInfo *RAInfo + ReceiveTimeout time.Duration + SecureServingInfo *SecureServingInfo + ShutdownTimeout time.Duration + func (s *GenericGRPCServer[Txp, Ep, Svc, Store]) Close() error + func (s *GenericGRPCServer[Txp, Ep, Svc, Store]) PrepareRun() PreparedGenericGRPCServer + type InsecureServingInfo struct + BindAddress string + BindPort int + func (i *InsecureServingInfo) Address() string + type PreparedGenericAPIServer interface + Close func() error + Run func() error + type PreparedGenericGRPCServer interface + Close func() error + Run func() error + type RAInfo struct + Host string + Port int + type SecureServingInfo struct + BindAddress string + BindPort int + CertKey CertKey + func (s *SecureServingInfo) Address() string