File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,20 @@ type EmptyCallOption struct{}
189
189
func (EmptyCallOption ) before (* callInfo ) error { return nil }
190
190
func (EmptyCallOption ) after (* callInfo , * csAttempt ) {}
191
191
192
+ // StaticMethod returns a CallOption which specifies that a call is being made
193
+ // to a method that is static, which means the method is known at compile time
194
+ // and doesn't change at runtime. This can be used as a signal to stats plugins
195
+ // that this method is safe to include as a key to a measurement.
196
+ func StaticMethod () CallOption {
197
+ return StaticMethodCallOption {}
198
+ }
199
+
200
+ // StaticMethodCallOption is a CallOption that specifies that a call comes
201
+ // from a static method.
202
+ type StaticMethodCallOption struct {
203
+ EmptyCallOption
204
+ }
205
+
192
206
// Header returns a CallOptions that retrieves the header metadata
193
207
// for a unary RPC.
194
208
func Header (md * metadata.MD ) CallOption {
@@ -958,6 +972,7 @@ const (
958
972
SupportPackageIsVersion5 = true
959
973
SupportPackageIsVersion6 = true
960
974
SupportPackageIsVersion7 = true
975
+ SupportPackageIsVersion8 = true
961
976
)
962
977
963
978
const grpcUA = "grpc-go/" + Version
You can’t perform that action at this time.
0 commit comments