Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GRPC2 = promauto.NewSummaryVec(prometheus.SummaryOpts{ Namespace: "logistic", Subsystem: "package", Name: "grpc2", Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, []string{"method"}, )
View Source
var GRPCCounter = promauto.NewCounter(prometheus.CounterOpts{
Namespace: "logistic",
Subsystem: "package_api",
Name: "grpc_total",
Help: "Total gRPC calls",
})
Functions ¶
func NewGatewayServer ¶
func NewGatewayServer() *gatewayServer
NewGatewayServer returns HTTP gRPC-gateway server
func NewMetricsServer ¶
func NewMetricsServer() *metricsServer
func NewStatusServer ¶
Types ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
GrpcServer is gRPC server
func NewGrpcServer ¶
func NewGrpcServer(packageService *service.PackageService, batchSize uint) *GrpcServer
NewGrpcServer returns gRPC server with supporting of batch listing
func (*GrpcServer) Start ¶
func (s *GrpcServer) Start(cancelFunc context.CancelFunc)
Start method runs server
func (*GrpcServer) Stop ¶
func (s *GrpcServer) Stop() error
Click to show internal directories.
Click to hide internal directories.