There was an error while loading. Please reload this page.
EmptyCallOption
1 parent 1c69e4c commit c839aeeCopy full SHA for c839aee
rpc_util.go
@@ -159,6 +159,14 @@ type CallOption interface {
159
after(*callInfo)
160
}
161
162
+// EmptyCallOption does not alter the Call configuration.
163
+// It can be embedded in another structure to carry satellite data for use
164
+// by interceptors.
165
+type EmptyCallOption struct{}
166
+
167
+type (EmptyCallOption) before(*callInfo) error { return nil }
168
+type (EmptyCallOption) after(*callInfo) {}
169
170
type beforeCall func(c *callInfo) error
171
172
func (o beforeCall) before(c *callInfo) error { return o(c) }
0 commit comments