Documentation
¶
Index ¶
- Constants
- func DisabledVersionStreamServerInterceptor(defaultVersion KinVersion, disabledVersions []int) grpc.StreamServerInterceptor
- func DisabledVersionUnaryServerInterceptor(defaultVersion KinVersion, disabledVersions []int) grpc.UnaryServerInterceptor
- func MinVersionStreamServerInterceptor() grpc.StreamServerInterceptor
- func MinVersionUnaryServerInterceptor() grpc.UnaryServerInterceptor
- type KinVersion
Constants ¶
const ( KinVersionHeader = "kin-version" DesiredKinVersionHeader = "desired-kin-version" )
Variables ¶
This section is empty.
Functions ¶
func DisabledVersionStreamServerInterceptor ¶ added in v0.2.6
func DisabledVersionStreamServerInterceptor(defaultVersion KinVersion, disabledVersions []int) grpc.StreamServerInterceptor
func DisabledVersionUnaryServerInterceptor ¶ added in v0.2.6
func DisabledVersionUnaryServerInterceptor(defaultVersion KinVersion, disabledVersions []int) grpc.UnaryServerInterceptor
func MinVersionStreamServerInterceptor ¶ added in v0.2.3
func MinVersionStreamServerInterceptor() grpc.StreamServerInterceptor
MinVersionStreamServerInterceptor prevents versions below the minimum version from accessing lower version APIs.
func MinVersionUnaryServerInterceptor ¶ added in v0.2.3
func MinVersionUnaryServerInterceptor() grpc.UnaryServerInterceptor
MinVersionUnaryServerInterceptor prevents versions below the minimum version from accessing lower version APIs.
Types ¶
type KinVersion ¶
type KinVersion uint16
const ( KinVersionUnknown KinVersion = iota KinVersionReserved KinVersion2 KinVersion3 KinVersion4 )
func GetCtxDesiredVersion ¶ added in v0.2.3
func GetCtxDesiredVersion(ctx context.Context) (version KinVersion, err error)
GetCtxDesiredVersion determines which version of Kin the requestor whiches to have enforced.
func GetCtxKinVersion ¶
func GetCtxKinVersion(ctx context.Context) (version KinVersion, err error)
GetCtxKinVersion determines which version of Kin to use based on the headers in the provided context.