test_server

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestServer

type TestServer struct {
	test_server.UnimplementedGreeterServer

	OAuthAddress string

	Mu                           sync.Mutex
	SayHelloInvocations          int
	SayMultiHellosInvocations    int
	SayHelloHowAreYouInvocations int
	SayHelloBidiInvocations      int

	Port int
	// contains filtered or unexported fields
}

func StartGRPCServer

func StartGRPCServer(t *testing.T, opts ...TestServerOpt) *TestServer

func (*TestServer) GetReceivedMetadata

func (s *TestServer) GetReceivedMetadata() []metadata.MD

func (*TestServer) SayHello

func (*TestServer) SayHelloHowAreYou

func (*TestServer) SayMultipleHellos

func (s *TestServer) SayMultipleHellos(stream test_server.Greeter_SayMultipleHellosServer) error

func (*TestServer) Stop

func (s *TestServer) Stop()

type TestServerOpt

type TestServerOpt func(*TestServer)

func WithHealthCheck

func WithHealthCheck() TestServerOpt

func WithOAuth2

func WithOAuth2() TestServerOpt

func WithReflection

func WithReflection() TestServerOpt

func WithReturnErrors

func WithReturnErrors() TestServerOpt

func WithTLS

func WithTLS() TestServerOpt

Jump to

Keyboard shortcuts

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