Documentation
¶
Overview ¶
Package adaptors provides adaptors for common services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCService ¶
type GRPCService struct {
// contains filtered or unexported fields
}
GRPCService is a gRPC server adapter for lifecycle manager.
func NewGRPCService ¶
func NewGRPCService(addr string, srv *grpc.Server) *GRPCService
NewGRPCService creates new gRPC server adapter.
func (*GRPCService) RegisterLifecycle ¶
func (s *GRPCService) RegisterLifecycle(name string, lf LifecycleRegistry)
RegisterLifecycle registers service in lifecycle manager.
type HTTPService ¶
type HTTPService struct {
// contains filtered or unexported fields
}
HTTPService is an adapter for http.Server to implement lifecycle hooks.
func NewHTTPService ¶
func NewHTTPService(srv *http.Server) *HTTPService
NewHTTPService creates new HTTPService adaptor.
func (*HTTPService) RegisterLifecycle ¶
func (s *HTTPService) RegisterLifecycle(name string, lf LifecycleRegistry)
RegisterLifecycle registers this service in lifecycle manager.
type LifecycleRegistry ¶
type LifecycleRegistry interface {
RegisterService(service types.ServiceConfig)
}
LifecycleRegistry provides method to register lifecycle service.
Click to show internal directories.
Click to hide internal directories.