server

package
v0.0.0-...-86dbffa Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT, MIT Imports: 18 Imported by: 0

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"})
)

ProviderSet is server providers.

Functions

func NewGRPCServer

func NewGRPCServer(c *conf.Server, catalog *service.CatalogService, tp *tracesdk.TracerProvider, logger log.Logger) *grpc.Server

NewGRPCServer new a gRPC server.

func NewHTTPServer

func NewHTTPServer(c *conf.Server, catalog *service.CatalogService, tp *tracesdk.TracerProvider, logger log.Logger) *http.Server

NewHTTPServer new a HTTP server.

func NewRegistrar

func NewRegistrar(conf *conf.Registry) registry.Registrar

Types

This section is empty.

Jump to

Keyboard shortcuts

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