Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(isEnabled bool) grpc.StreamServerInterceptor
StreamServerInterceptor returns a new interceptor which handles server version requests.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(isEnabled bool) grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new interceptor which handles server version requests.
Types ¶
type HandleServerVersion ¶
type HandleServerVersion struct {
// IsEnabled is whether the middleware is enabled.
IsEnabled bool
// GetVersion is the function used to retrieve the service version.
GetVersion func() (string, error)
}
HandleServerVersion defines a middleware for returning the version of the server when requested via the RequestServerVersion header.
func (*HandleServerVersion) ServerReporter ¶
func (r *HandleServerVersion) ServerReporter(ctx context.Context, _ interceptors.CallMeta) (interceptors.Reporter, context.Context)
Click to show internal directories.
Click to hide internal directories.