proxytest

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestService     = "grpc.testing.TestService"
	NotFoundService = "not.found.NoService"
	EmptyCall       = "EmptyCall"
	UnaryCall       = "UnaryCall"
	NotFoundCall    = "NotFoundCall"
	File            = "grpc_testing/test.proto"
)

Variables

View Source
var (
	TestError = errors.Errorf("an error")
)

Functions

func NewFileDescriptor

func NewFileDescriptor(t *testing.T, file string) *desc.FileDescriptor

NewFileDescriptor is a test helper that parses a .proto file into a file descriptor

func ParseURL

func ParseURL(t *testing.T, rawurl string) *url.URL

ParseURL is a test helper that parses URLs into *url.URL, and fails the test on parse failure

Types

type FakeGrpcdynamicStub

type FakeGrpcdynamicStub struct {
}

func (*FakeGrpcdynamicStub) InvokeRpc

func (m *FakeGrpcdynamicStub) InvokeRpc(ctx context.Context, method *desc.MethodDescriptor, request proto.Message, opts ...grpc.CallOption) (proto.Message, error)

type FakeGrpcreflectClient

type FakeGrpcreflectClient struct {
	*desc.ServiceDescriptor
}

func (*FakeGrpcreflectClient) ResolveService

func (m *FakeGrpcreflectClient) ResolveService(serviceName string) (*desc.ServiceDescriptor, error)

Jump to

Keyboard shortcuts

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