Documentation ¶
Index ¶
- type GrpcServerInterface
- func (iface *GrpcServerInterface) GetKind() string
- func (iface *GrpcServerInterface) GetServer() *grpc.Server
- func (iface *GrpcServerInterface) PrependUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
- func (iface *GrpcServerInterface) PushUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
- func (iface *GrpcServerInterface) Start()
- func (iface *GrpcServerInterface) Stop(deadline *time.Time)
- type HttpServerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcServerInterface ¶
type GrpcServerInterface struct {
// contains filtered or unexported fields
}
func NewGrpcServerInterface ¶
func NewGrpcServerInterface(addrs []string, cert *tls.Certificate, logger *zap.Logger) *GrpcServerInterface
func (*GrpcServerInterface) GetKind ¶
func (iface *GrpcServerInterface) GetKind() string
Interface impl.
func (*GrpcServerInterface) GetServer ¶
func (iface *GrpcServerInterface) GetServer() *grpc.Server
func (*GrpcServerInterface) PrependUnaryInterceptor ¶
func (iface *GrpcServerInterface) PrependUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
func (*GrpcServerInterface) PushUnaryInterceptor ¶
func (iface *GrpcServerInterface) PushUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
Note: *Not* thread safe. Interceptor chains run on the *unsafe* assumption that the backing array only gets mutated during construction/initialization, and in sequence at that.
func (*GrpcServerInterface) Stop ¶
func (iface *GrpcServerInterface) Stop(deadline *time.Time)
Interface impl. @todo gRPC does not support deadlines on its own. We could wrap some timers given lots of spare time, but otherwise the main Runner will take care of imposing a hard deadline on the whole process.
type HttpServerInterface ¶
type HttpServerInterface struct {
// contains filtered or unexported fields
}
func NewHttpServerInterface ¶
func NewHttpServerInterface(addrs []string, cert *tls.Certificate, logger *zap.Logger) *HttpServerInterface
func (*HttpServerInterface) GetHandler ¶
func (iface *HttpServerInterface) GetHandler() *gin.Engine
func (*HttpServerInterface) GetKind ¶
func (iface *HttpServerInterface) GetKind() string
func (*HttpServerInterface) Stop ¶
func (iface *HttpServerInterface) Stop(deadline *time.Time)
Interface impl.
Click to show internal directories.
Click to hide internal directories.