serverversion

package
v1.25.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 2

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL