server

package
v0.0.0-...-6d99c5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 27 Imported by: 0

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

func NewStatusServer(isReady *atomic.Value) *statusServer

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL