Versions in this module Expand all Collapse all v0 v0.0.3 Oct 22, 2024 Changes in this version + func RegisterCommonFlags(cmd *cobra.Command) v0.0.2 Jun 3, 2024 Changes in this version + const BufferedNetwork + func RegisterDeprecatedHTTPServerFlags(cmd *cobra.Command, flagPrefix, serviceName string) error + func RegisterGRPCServerFlags(flags *pflag.FlagSet, config *GRPCServerConfig, ...) + func RegisterHTTPServerFlags(flags *pflag.FlagSet, config *HTTPServerConfig, ...) + type DialFunc func(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error) + type GRPCServerConfig struct + Address string + BufferSize int + ClientCAPath string + Enabled bool + MaxConnAge time.Duration + MaxWorkers uint32 + Network string + TLSCertPath string + TLSKeyPath string + func GRPCServerConfigWithOptions(g *GRPCServerConfig, opts ...GRPCServerConfigOption) *GRPCServerConfig + func NewGRPCServerConfigWithOptions(opts ...GRPCServerConfigOption) *GRPCServerConfig + func NewGRPCServerConfigWithOptionsAndDefaults(opts ...GRPCServerConfigOption) *GRPCServerConfig + func (c *GRPCServerConfig) Complete(level zerolog.Level, svcRegistrationFn func(server *grpc.Server), ...) (RunnableGRPCServer, error) + func (g *GRPCServerConfig) ToOption() GRPCServerConfigOption + func (g *GRPCServerConfig) WithOptions(opts ...GRPCServerConfigOption) *GRPCServerConfig + func (g GRPCServerConfig) DebugMap() map[string]any + type GRPCServerConfigOption func(g *GRPCServerConfig) + func WithAddress(address string) GRPCServerConfigOption + func WithBufferSize(bufferSize int) GRPCServerConfigOption + func WithClientCAPath(clientCAPath string) GRPCServerConfigOption + func WithEnabled(enabled bool) GRPCServerConfigOption + func WithMaxConnAge(maxConnAge time.Duration) GRPCServerConfigOption + func WithMaxWorkers(maxWorkers uint32) GRPCServerConfigOption + func WithNetwork(network string) GRPCServerConfigOption + func WithTLSCertPath(tLSCertPath string) GRPCServerConfigOption + func WithTLSKeyPath(tLSKeyPath string) GRPCServerConfigOption + type HTTPServerConfig struct + HTTPAddress string + HTTPEnabled bool + HTTPTLSCertPath string + HTTPTLSKeyPath string + func HTTPServerConfigWithOptions(h *HTTPServerConfig, opts ...HTTPServerConfigOption) *HTTPServerConfig + func NewHTTPServerConfigWithOptions(opts ...HTTPServerConfigOption) *HTTPServerConfig + func NewHTTPServerConfigWithOptionsAndDefaults(opts ...HTTPServerConfigOption) *HTTPServerConfig + func (c *HTTPServerConfig) Complete(level zerolog.Level, handler http.Handler) (RunnableHTTPServer, error) + func (h *HTTPServerConfig) ToOption() HTTPServerConfigOption + func (h *HTTPServerConfig) WithOptions(opts ...HTTPServerConfigOption) *HTTPServerConfig + func (h HTTPServerConfig) DebugMap() map[string]any + type HTTPServerConfigOption func(h *HTTPServerConfig) + func WithHTTPAddress(hTTPAddress string) HTTPServerConfigOption + func WithHTTPEnabled(hTTPEnabled bool) HTTPServerConfigOption + func WithHTTPTLSCertPath(hTTPTLSCertPath string) HTTPServerConfigOption + func WithHTTPTLSKeyPath(hTTPTLSKeyPath string) HTTPServerConfigOption + type NetDialFunc func(ctx context.Context, s string) (net.Conn, error) + type RunnableGRPCServer interface + DialContext func(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error) + GracefulStop func() + Insecure func() bool + Listen func(ctx context.Context) func() error + NetDialContext func(ctx context.Context, s string) (net.Conn, error) + WithOpts func(opts ...grpc.ServerOption) RunnableGRPCServer + type RunnableHTTPServer interface + Close func() + ListenAndServe func() error