Documentation ¶
Index ¶
- type Addr
- type Service
- func (service *Service) AddStreamInterceptor(interceptor grpc.StreamServerInterceptor)
- func (service *Service) AddUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
- func (service *Service) GRPCImplementation(r func(*grpc.Server))
- func (service *Service) Run()
- func (service *Service) Shutdown()
- func (service *Service) UsePrometheusAdrr(addr Addr)
- func (service *Service) UseRegistry(r registry.Registry)
- func (service *Service) UseServiceAdrr(addr Addr)
- func (service *Service) UseTracer(t opentracing.Tracer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { ID string Name string ServiceAdrr Addr PrometheusAdrr Addr // Interceptors UnaryInterceptors []grpc.UnaryServerInterceptor StreamInterceptors []grpc.StreamServerInterceptor // The RPC server implementation GRPCServer func(*grpc.Server) // Tracing Tracer opentracing.Tracer //Registry Registry registry.Registry // contains filtered or unexported fields }
Service define.
func (*Service) AddStreamInterceptor ¶
func (service *Service) AddStreamInterceptor(interceptor grpc.StreamServerInterceptor)
AddStreamInterceptor adds a stream interceptor to the RPC server
func (*Service) AddUnaryInterceptor ¶
func (service *Service) AddUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
AddUnaryInterceptor adds a unary interceptor to the RPC server
func (*Service) GRPCImplementation ¶
GRPCImplementation for GRPCServer
func (*Service) UsePrometheusAdrr ¶
UsePrometheusAdrr to set PrometheusAdrr
func (*Service) UseRegistry ¶
UseRegistry to set registry
func (*Service) UseServiceAdrr ¶
UseServiceAdrr to set ServiceAdrr
Click to show internal directories.
Click to hide internal directories.