mockgrpc

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockGRPC

type MockGRPC struct {
	// contains filtered or unexported fields
}

func NewMockGRPC

func NewMockGRPC(opts ...OptionGRPC) *MockGRPC

NewMockGRPC create a new MockGRPC

func (*MockGRPC) GetAddr

func (m *MockGRPC) GetAddr() string

GetAddr get the address of mock grpc server

func (*MockGRPC) Start

func (m *MockGRPC) Start() error

Start start the mock grpc server

func (*MockGRPC) Stop

func (m *MockGRPC) Stop() error

Stop stop the mock grpc server

type OptionGRPC

type OptionGRPC func(*MockGRPC)

option for New MockGRPC

func WithContainerName

func WithContainerName(name string) OptionGRPC

WithContainerName set the name of container

func WithDirProtocs

func WithDirProtocs(dir string) OptionGRPC

WithDirProtocs set the directory of protoc files

func WithDirStubs

func WithDirStubs(dir string) OptionGRPC

WithDirStubs set the directory of stubs

func WithPortAdmin

func WithPortAdmin(port int) OptionGRPC

WithPortAdmin set the port of admin

func WithPortGrpc

func WithPortGrpc(port int) OptionGRPC

WithPortGrpc set the port of grpc

Jump to

Keyboard shortcuts

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