grpcutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireStatus

func RequireStatus(t *testing.T, expected codes.Code, err error)

RequireStatus asserts that an error is a gRPC error and returns the expected status code.

Types

type AuthlessHealthServer

type AuthlessHealthServer struct {
	*health.Server
	IgnoreAuthMixin
}

AuthlessHealthServer implements a gRPC health endpoint that will ignore any auth requirements set by github.com/grpc-ecosystem/go-grpc-middleware/auth.

func NewAuthlessHealthServer

func NewAuthlessHealthServer() *AuthlessHealthServer

NewAuthlessServer returns a new gRPC health server that ignores auth middleware.

type IgnoreAuthMixin

type IgnoreAuthMixin struct{}

IgnoreAuthMix implements the ServiceAuthFuncOverride interface to ignore any auth requirements set by github.com/grpc-ecosystem/go-grpc-middleware/auth.

func (IgnoreAuthMixin) AuthFuncOverride

func (m IgnoreAuthMixin) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)

Jump to

Keyboard shortcuts

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