Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Name is the name of the compiled software. Name = "metrics" MetricSeconds = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "server", Subsystem: "requests", Name: "duration_sec", Help: "server requests duration(sec).", Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.250, 0.5, 1}, }, []string{"kind", "operation"}) MetricRequests = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "client", Subsystem: "requests", Name: "code_total", Help: "The total number of processed requests", }, []string{"kind", "operation", "code", "reason"}) )
View Source
var ProviderSet = wire.NewSet(NewHTTPServer, NewGRPCServer)
ProviderSet is server providers.
Functions ¶
func NewGRPCServer ¶
func NewGRPCServer(c *conf.Server, s *service.ShopInterface, tp *tracesdk.TracerProvider, logger log.Logger) *grpc.Server
NewGRPCServer new a gRPC server.
func NewHTTPServer ¶
func NewHTTPServer(c *conf.Server, s *service.ShopInterface, tp *tracesdk.TracerProvider, logger log.Logger) *http.Server
NewHTTPServer new a HTTP server.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.