Documentation ¶
Index ¶
- Constants
- type Closeable
- type Container
- type HealthCheckClient
- type HealthCheckFn
- type NewServiceFn
- type Option
- func WithAddr(a string) Option
- func WithContext(ctx context.Context) Option
- func WithHealthCheckFn(healthCheck HealthCheckFn) Option
- func WithListener(l service.GrpcListener) Option
- func WithName(n string) Option
- func WithNewServiceFn(newService NewServiceFn) Option
- func WithPProfAddr(addr *string) Option
- func WithProfilingEnabled(p bool) Option
- func WithServiceDesc(serviceDesc *grpc.ServiceDesc) Option
- type Options
- type Service
- func (g *Service) Addr() string
- func (g *Service) Dial(d service.GrpcDialer) (*grpc.ClientConn, error)
- func (g *Service) Dispose()
- func (g *Service) DoServe(listener net.Listener) error
- func (g *Service) Metadata() map[string]string
- func (g *Service) Name() string
- func (g *Service) NewHelthCheckClient(d service.GrpcDialer) (*HealthCheckClient, error)
- func (g *Service) Serve() error
- func (g *Service) Stop()
Constants ¶
View Source
const Kind = service.GRPC
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
func (*Container) AddrOrPanic ¶
func (*Container) NewHealthCheckClient ¶
func (c *Container) NewHealthCheckClient() (service.HealthChecker, error)
type HealthCheckClient ¶
type HealthCheckClient struct {
// contains filtered or unexported fields
}
func NewHelthCheckClient ¶
func NewHelthCheckClient(ctx context.Context, addr string, name string, d service.GrpcDialer) (*HealthCheckClient, error)
func NewHelthCheckClientWithConn ¶
func NewHelthCheckClientWithConn(conn *grpc.ClientConn, name string) (*HealthCheckClient, error)
func (*HealthCheckClient) Check ¶
func (c *HealthCheckClient) Check(ctx context.Context) (healthpb.HealthCheckResponse_ServingStatus, error)
func (*HealthCheckClient) Close ¶
func (c *HealthCheckClient) Close() error
type HealthCheckFn ¶
type Option ¶
type Option interface {
Apply(*Options)
}
func WithContext ¶
func WithHealthCheckFn ¶
func WithHealthCheckFn(healthCheck HealthCheckFn) Option
func WithListener ¶
func WithListener(l service.GrpcListener) Option
func WithNewServiceFn ¶
func WithNewServiceFn(newService NewServiceFn) Option
func WithPProfAddr ¶
func WithProfilingEnabled ¶
func WithServiceDesc ¶
func WithServiceDesc(serviceDesc *grpc.ServiceDesc) Option
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Dial ¶
func (g *Service) Dial(d service.GrpcDialer) (*grpc.ClientConn, error)
func (*Service) NewHelthCheckClient ¶
func (g *Service) NewHelthCheckClient(d service.GrpcDialer) (*HealthCheckClient, error)
Click to show internal directories.
Click to hide internal directories.