Documentation
¶
Index ¶
- func ClientHTTPService(addr string) *http.Server
- func GoHTTPService(addr string, grpcServer *grpc.Server) *http.Server
- func StreamClientMetrics() grpc.StreamClientInterceptor
- func StreamServerMetrics(opts ...MetricsOption) grpc.StreamServerInterceptor
- func UnaryClientMetrics() grpc.UnaryClientInterceptor
- func UnaryServerMetrics(opts ...MetricsOption) grpc.UnaryServerInterceptor
- type MetricsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientHTTPService ¶
ClientHTTPService 初始化客户端的prometheus的exporter服务,使用 http://ip:port/metrics 获取数据
func GoHTTPService ¶
GoHTTPService 初始化服务端的prometheus的exporter服务,使用 http://ip:port/metrics 获取数据
func StreamClientMetrics ¶
func StreamClientMetrics() grpc.StreamClientInterceptor
StreamClientMetrics metrics stream拦截器
func StreamServerMetrics ¶
func StreamServerMetrics(opts ...MetricsOption) grpc.StreamServerInterceptor
StreamServerMetrics metrics stream拦截器
func UnaryClientMetrics ¶
func UnaryClientMetrics() grpc.UnaryClientInterceptor
UnaryClientMetrics metrics unary拦截器
func UnaryServerMetrics ¶
func UnaryServerMetrics(opts ...MetricsOption) grpc.UnaryServerInterceptor
UnaryServerMetrics metrics unary拦截器
Types ¶
type MetricsOption ¶
type MetricsOption func(*metricsOptions)
MetricsOption 设置metrics
func WithCounterMetrics ¶
func WithCounterMetrics(metrics ...*prometheus.CounterVec) MetricsOption
WithCounterMetrics 添加Counter类型指标
func WithGaugeMetrics ¶
func WithGaugeMetrics(metrics ...*prometheus.GaugeVec) MetricsOption
WithGaugeMetrics 添加Gauge类型指标
func WithHistogramMetrics ¶
func WithHistogramMetrics(metrics ...*prometheus.HistogramVec) MetricsOption
WithHistogramMetrics 添加Histogram类型指标
func WithSummaryMetrics ¶
func WithSummaryMetrics(metrics ...*prometheus.SummaryVec) MetricsOption
WithSummaryMetrics 添加Summary类型指标
Click to show internal directories.
Click to hide internal directories.