Documentation ¶
Index ¶
- func ContextWithStats(ctx context.Context, stats *GRPCStats) context.Context
- func EnableAdmin(s grpc.ServiceRegistrar) (cleanup func(), _ error)
- func EnableDebug(s *grpc.Server)
- func EnableHealth(srv string, s *grpc.Server)
- func EnableReflection(s *grpc.Server)
- func HeaderGet(h Header, name string) string
- func IsGRPCRequest(r *http.Request) bool
- type GRPCStats
- type GRPCStatsHandler
- func (c *GRPCStatsHandler) Close()
- func (c *GRPCStatsHandler) Collect(ch chan<- prometheus.Metric)
- func (c *GRPCStatsHandler) Describe(ch chan<- *prometheus.Desc)
- func (c *GRPCStatsHandler) HandleConn(ctx context.Context, s stats.ConnStats)
- func (c *GRPCStatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)
- func (c *GRPCStatsHandler) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
- func (c *GRPCStatsHandler) TagRPC(ctx context.Context, tagInfo *stats.RPCTagInfo) context.Context
- type Header
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithStats ¶
ContextWithStats Returns a new `context.Context` that holds a reference to `GRPCStats`.
func EnableAdmin ¶
func EnableAdmin(s grpc.ServiceRegistrar) (cleanup func(), _ error)
func EnableDebug ¶
func EnableHealth ¶
func EnableReflection ¶
func IsGRPCRequest ¶
IsGRPCRequest returns true if the message is considered to be a GRPC message
Types ¶
type GRPCStats ¶
func StatsFromContext ¶
StatsFromContext Returns the `GRPCStats` previously associated with `ctx`.
type GRPCStatsHandler ¶
type GRPCStatsHandler struct {
// contains filtered or unexported fields
}
GRPCStatsHandler Implements the Prometheus collector interface. Such that when the /metrics handler is called this collector pulls all the stats from
func NewGRPCStatsHandler ¶
func NewGRPCStatsHandler() *GRPCStatsHandler
func (*GRPCStatsHandler) Close ¶
func (c *GRPCStatsHandler) Close()
func (*GRPCStatsHandler) Collect ¶
func (c *GRPCStatsHandler) Collect(ch chan<- prometheus.Metric)
func (*GRPCStatsHandler) Describe ¶
func (c *GRPCStatsHandler) Describe(ch chan<- *prometheus.Desc)
func (*GRPCStatsHandler) HandleConn ¶
func (c *GRPCStatsHandler) HandleConn(ctx context.Context, s stats.ConnStats)
func (*GRPCStatsHandler) HandleRPC ¶
func (c *GRPCStatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)
func (*GRPCStatsHandler) TagConn ¶
func (c *GRPCStatsHandler) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
func (*GRPCStatsHandler) TagRPC ¶
func (c *GRPCStatsHandler) TagRPC(ctx context.Context, tagInfo *stats.RPCTagInfo) context.Context
Click to show internal directories.
Click to hide internal directories.