Skip to content

Commit

Permalink
Respond to Doug's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zasweq committed Feb 14, 2024
1 parent 940a950 commit 9755a3d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rpc_util.go
Expand Up @@ -190,19 +190,18 @@ func (EmptyCallOption) before(*callInfo) error { return nil }
func (EmptyCallOption) after(*callInfo, *csAttempt) {}

// StaticMethod returns a CallOption which specifies that a call is being made
// to a method that is static, which the method is known at compile time and
// doesn't change at runtime. This can be used as a signal to stats plugins that
// this method is safe to include as a key to a measurement.
// to a method that is static, which means the method is known at compile time
// and doesn't change at runtime. This can be used as a signal to stats plugins
// that this method is safe to include as a key to a measurement.
func StaticMethod() CallOption {
return StaticMethodCallOption{}

Check warning on line 197 in rpc_util.go

View check run for this annotation

Codecov / codecov/patch

rpc_util.go#L196-L197

Added lines #L196 - L197 were not covered by tests
}

// StaticMethodCallOption is a CallOption that specifies that a call comes
// from a static method.
type StaticMethodCallOption struct{}

func (StaticMethodCallOption) before(*callInfo) error { return nil }
func (StaticMethodCallOption) after(*callInfo, *csAttempt) {}
type StaticMethodCallOption struct {
EmptyCallOption
}

// Header returns a CallOptions that retrieves the header metadata
// for a unary RPC.
Expand Down

0 comments on commit 9755a3d

Please sign in to comment.