forked from grpc-ecosystem/go-grpc-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver_extension.go
More file actions
54 lines (39 loc) · 1.34 KB
/
server_extension.go
File metadata and controls
54 lines (39 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package grpc_prometheus
import "context"
type ServerExtension interface {
ServerHandledCounterCustomLabels() []string
ServerHandledCounterValues(ctx context.Context) []string
ServerStreamMsgReceivedCounterCustomLabels() []string
ServerStreamMsgReceivedCounterValues(ctx context.Context) []string
ServerStreamMsgSentCounterCustomLabels() []string
ServerStreamMsgSentCounterValues(ctx context.Context) []string
ServerHandledHistogramCustomLabels() []string
ServerHandledHistogramValues(ctx context.Context) []string
}
type DefaultExtension struct {
}
var emptyExtension ServerExtension = DefaultExtension{}
func (DefaultExtension) ServerHandledCounterCustomLabels() []string {
return nil
}
func (DefaultExtension) ServerHandledCounterValues(context.Context) []string {
return nil
}
func (DefaultExtension) ServerStreamMsgReceivedCounterCustomLabels() []string {
return nil
}
func (DefaultExtension) ServerStreamMsgReceivedCounterValues(context.Context) []string {
return nil
}
func (DefaultExtension) ServerStreamMsgSentCounterCustomLabels() []string {
return nil
}
func (DefaultExtension) ServerStreamMsgSentCounterValues(context.Context) []string {
return nil
}
func (DefaultExtension) ServerHandledHistogramCustomLabels() []string {
return nil
}
func (DefaultExtension) ServerHandledHistogramValues(context.Context) []string {
return nil
}