Documentation
¶
Index ¶
- type ApiServer
- type ApiServerConfig
- type ApiServerOption
- func WithContext(ctx context.Context) ApiServerOption
- func WithGRPCListener(listener net.Listener) ApiServerOption
- func WithHTTPListener(listener net.Listener) ApiServerOption
- func WithHTTPRegistrationFunc(fn HttpRegistrationFunc) ApiServerOption
- func WithLogger(log *zap.Logger) ApiServerOption
- func WithPrometheusRegistry(reg *prometheus.Registry) ApiServerOption
- func WithReflection(enabled bool) ApiServerOption
- func WithRegistrationFunc(fn RegistrationFunc) ApiServerOption
- func WithStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) ApiServerOption
- func WithUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) ApiServerOption
- type HttpRegistrationFunc
- type RegistrationFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiServer ¶
type ApiServer struct {
// contains filtered or unexported fields
}
func NewAPIServer ¶
func NewAPIServer(opts ...ApiServerOption) (*ApiServer, error)
type ApiServerConfig ¶ added in v0.4.0
type ApiServerConfig struct {
Ctx context.Context
Log *zap.Logger
GRPCListener net.Listener
HTTPListener net.Listener
EnableReflection bool
RegistrationFunc RegistrationFunc
HTTPRegistrationFunc HttpRegistrationFunc
PromRegistry *prometheus.Registry
UnaryInterceptors []grpc.UnaryServerInterceptor
StreamInterceptors []grpc.StreamServerInterceptor
}
type ApiServerOption ¶ added in v0.4.0
type ApiServerOption func(*ApiServerConfig)
func WithContext ¶ added in v0.4.0
func WithContext(ctx context.Context) ApiServerOption
func WithGRPCListener ¶ added in v0.5.0
func WithGRPCListener(listener net.Listener) ApiServerOption
func WithHTTPListener ¶ added in v0.5.0
func WithHTTPListener(listener net.Listener) ApiServerOption
func WithHTTPRegistrationFunc ¶ added in v0.4.0
func WithHTTPRegistrationFunc(fn HttpRegistrationFunc) ApiServerOption
func WithLogger ¶ added in v0.4.0
func WithLogger(log *zap.Logger) ApiServerOption
func WithPrometheusRegistry ¶ added in v0.4.0
func WithPrometheusRegistry(reg *prometheus.Registry) ApiServerOption
func WithReflection ¶ added in v0.4.0
func WithReflection(enabled bool) ApiServerOption
func WithRegistrationFunc ¶ added in v0.4.0
func WithRegistrationFunc(fn RegistrationFunc) ApiServerOption
func WithStreamInterceptors ¶ added in v0.5.0
func WithStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) ApiServerOption
func WithUnaryInterceptors ¶ added in v0.5.0
func WithUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) ApiServerOption
type HttpRegistrationFunc ¶ added in v0.3.0
type HttpRegistrationFunc func(gwmux *runtime.ServeMux, conn *grpc.ClientConn) error
type RegistrationFunc ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.