Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGrpcConn ¶
func CreateGrpcConn(conf config.GrpcService) *grpc.ClientConn
func NewDefaultHealthChecker ¶
func NewDefaultHealthChecker() pb.HealthServer
func SqlErrorToGrpc ¶
Returns grpc error with code based on Sql error. Handles cases such as "not found" or "duplicate key"
Types ¶
type HealthChecker ¶
type HealthChecker struct {
pb.UnimplementedHealthServer
}
func (*HealthChecker) Check ¶
func (s *HealthChecker) Check(ctx context.Context, request *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)
func (*HealthChecker) Watch ¶
func (s *HealthChecker) Watch(request *pb.HealthCheckRequest, server pb.Health_WatchServer) error
type HealthCheckerInterface ¶
type HealthCheckerInterface interface { Check(ctx context.Context, request *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error) Watch(request *pb.HealthCheckRequest, server pb.Health_WatchServer) error }
type UkamaGrpcServer ¶
type UkamaGrpcServer struct { ExtraUnaryInterceptors []grpc.UnaryServerInterceptor ExtraStreamInterceptors []grpc.StreamServerInterceptor // contains filtered or unexported fields }
Basic GrpcServer with the set of middlewares
func NewGrpcServer ¶
func NewGrpcServer(config config.Grpc, serviceRegistrar func(s *grpc.Server)) *UkamaGrpcServer
func NewGrpcServerWithCustomHealthcheck ¶
func NewGrpcServerWithCustomHealthcheck(healthChecker *HealthChecker, config config.Grpc, serviceRegistrator func(s *grpc.Server)) *UkamaGrpcServer
func (*UkamaGrpcServer) StartServer ¶
func (g *UkamaGrpcServer) StartServer()
func (*UkamaGrpcServer) StopServer ¶
func (g *UkamaGrpcServer) StopServer()
Click to show internal directories.
Click to hide internal directories.