grpc

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grpc

type Grpc struct {
	mock.Mock
}

Grpc is an autogenerated mock type for the Grpc type

func NewGrpc

func NewGrpc(t interface {
	mock.TestingT
	Cleanup(func())
}) *Grpc

NewGrpc creates a new instance of Grpc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Grpc) Client

func (_m *Grpc) Client(ctx context.Context, name string) (*grpc.ClientConn, error)

Client provides a mock function with given fields: ctx, name

func (*Grpc) ClientStatsHandlerGroups added in v1.17.0

func (_m *Grpc) ClientStatsHandlerGroups(_a0 map[string][]stats.Handler)

ClientStatsHandlerGroups provides a mock function with given fields: _a0

func (*Grpc) Connect added in v1.17.0

func (_m *Grpc) Connect(server string) (*grpc.ClientConn, error)

Connect provides a mock function with given fields: server

func (*Grpc) EXPECT

func (_m *Grpc) EXPECT() *Grpc_Expecter

func (*Grpc) Listen added in v1.15.12

func (_m *Grpc) Listen(l net.Listener) error

Listen provides a mock function with given fields: l

func (*Grpc) Run

func (_m *Grpc) Run(host ...string) error

Run provides a mock function with given fields: host

func (*Grpc) Server

func (_m *Grpc) Server() *grpc.Server

Server provides a mock function with no fields

func (*Grpc) ServerStatsHandlers added in v1.17.0

func (_m *Grpc) ServerStatsHandlers(_a0 []stats.Handler)

ServerStatsHandlers provides a mock function with given fields: _a0

func (*Grpc) Shutdown added in v1.15.12

func (_m *Grpc) Shutdown(force ...bool) error

Shutdown provides a mock function with given fields: force

func (*Grpc) UnaryClientInterceptorGroups

func (_m *Grpc) UnaryClientInterceptorGroups(_a0 map[string][]grpc.UnaryClientInterceptor)

UnaryClientInterceptorGroups provides a mock function with given fields: _a0

func (*Grpc) UnaryServerInterceptors

func (_m *Grpc) UnaryServerInterceptors(_a0 []grpc.UnaryServerInterceptor)

UnaryServerInterceptors provides a mock function with given fields: _a0

type Grpc_ClientStatsHandlerGroups_Call added in v1.17.0

type Grpc_ClientStatsHandlerGroups_Call struct {
	*mock.Call
}

Grpc_ClientStatsHandlerGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientStatsHandlerGroups'

func (*Grpc_ClientStatsHandlerGroups_Call) Return added in v1.17.0

func (*Grpc_ClientStatsHandlerGroups_Call) Run added in v1.17.0

func (*Grpc_ClientStatsHandlerGroups_Call) RunAndReturn added in v1.17.0

type Grpc_Client_Call

type Grpc_Client_Call struct {
	*mock.Call
}

Grpc_Client_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Client'

func (*Grpc_Client_Call) Return

func (_c *Grpc_Client_Call) Return(_a0 *grpc.ClientConn, _a1 error) *Grpc_Client_Call

func (*Grpc_Client_Call) Run

func (_c *Grpc_Client_Call) Run(run func(ctx context.Context, name string)) *Grpc_Client_Call

func (*Grpc_Client_Call) RunAndReturn

func (_c *Grpc_Client_Call) RunAndReturn(run func(context.Context, string) (*grpc.ClientConn, error)) *Grpc_Client_Call

type Grpc_Connect_Call added in v1.17.0

type Grpc_Connect_Call struct {
	*mock.Call
}

Grpc_Connect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connect'

func (*Grpc_Connect_Call) Return added in v1.17.0

func (_c *Grpc_Connect_Call) Return(_a0 *grpc.ClientConn, _a1 error) *Grpc_Connect_Call

func (*Grpc_Connect_Call) Run added in v1.17.0

func (_c *Grpc_Connect_Call) Run(run func(server string)) *Grpc_Connect_Call

func (*Grpc_Connect_Call) RunAndReturn added in v1.17.0

func (_c *Grpc_Connect_Call) RunAndReturn(run func(string) (*grpc.ClientConn, error)) *Grpc_Connect_Call

type Grpc_Expecter

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

func (*Grpc_Expecter) Client

func (_e *Grpc_Expecter) Client(ctx interface{}, name interface{}) *Grpc_Client_Call

Client is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Grpc_Expecter) ClientStatsHandlerGroups added in v1.17.0

func (_e *Grpc_Expecter) ClientStatsHandlerGroups(_a0 interface{}) *Grpc_ClientStatsHandlerGroups_Call

ClientStatsHandlerGroups is a helper method to define mock.On call

  • _a0 map[string][]stats.Handler

func (*Grpc_Expecter) Connect added in v1.17.0

func (_e *Grpc_Expecter) Connect(server interface{}) *Grpc_Connect_Call

Connect is a helper method to define mock.On call

  • server string

func (*Grpc_Expecter) Listen added in v1.15.12

func (_e *Grpc_Expecter) Listen(l interface{}) *Grpc_Listen_Call

Listen is a helper method to define mock.On call

  • l net.Listener

func (*Grpc_Expecter) Run

func (_e *Grpc_Expecter) Run(host ...interface{}) *Grpc_Run_Call

Run is a helper method to define mock.On call

  • host ...string

func (*Grpc_Expecter) Server

func (_e *Grpc_Expecter) Server() *Grpc_Server_Call

Server is a helper method to define mock.On call

func (*Grpc_Expecter) ServerStatsHandlers added in v1.17.0

func (_e *Grpc_Expecter) ServerStatsHandlers(_a0 interface{}) *Grpc_ServerStatsHandlers_Call

ServerStatsHandlers is a helper method to define mock.On call

  • _a0 []stats.Handler

func (*Grpc_Expecter) Shutdown added in v1.15.12

func (_e *Grpc_Expecter) Shutdown(force ...interface{}) *Grpc_Shutdown_Call

Shutdown is a helper method to define mock.On call

  • force ...bool

func (*Grpc_Expecter) UnaryClientInterceptorGroups

func (_e *Grpc_Expecter) UnaryClientInterceptorGroups(_a0 interface{}) *Grpc_UnaryClientInterceptorGroups_Call

UnaryClientInterceptorGroups is a helper method to define mock.On call

  • _a0 map[string][]grpc.UnaryClientInterceptor

func (*Grpc_Expecter) UnaryServerInterceptors

func (_e *Grpc_Expecter) UnaryServerInterceptors(_a0 interface{}) *Grpc_UnaryServerInterceptors_Call

UnaryServerInterceptors is a helper method to define mock.On call

  • _a0 []grpc.UnaryServerInterceptor

type Grpc_Listen_Call added in v1.15.12

type Grpc_Listen_Call struct {
	*mock.Call
}

Grpc_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'

func (*Grpc_Listen_Call) Return added in v1.15.12

func (_c *Grpc_Listen_Call) Return(_a0 error) *Grpc_Listen_Call

func (*Grpc_Listen_Call) Run added in v1.15.12

func (_c *Grpc_Listen_Call) Run(run func(l net.Listener)) *Grpc_Listen_Call

func (*Grpc_Listen_Call) RunAndReturn added in v1.15.12

func (_c *Grpc_Listen_Call) RunAndReturn(run func(net.Listener) error) *Grpc_Listen_Call

type Grpc_Run_Call

type Grpc_Run_Call struct {
	*mock.Call
}

Grpc_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'

func (*Grpc_Run_Call) Return

func (_c *Grpc_Run_Call) Return(_a0 error) *Grpc_Run_Call

func (*Grpc_Run_Call) Run

func (_c *Grpc_Run_Call) Run(run func(host ...string)) *Grpc_Run_Call

func (*Grpc_Run_Call) RunAndReturn

func (_c *Grpc_Run_Call) RunAndReturn(run func(...string) error) *Grpc_Run_Call

type Grpc_ServerStatsHandlers_Call added in v1.17.0

type Grpc_ServerStatsHandlers_Call struct {
	*mock.Call
}

Grpc_ServerStatsHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServerStatsHandlers'

func (*Grpc_ServerStatsHandlers_Call) Return added in v1.17.0

func (*Grpc_ServerStatsHandlers_Call) Run added in v1.17.0

func (*Grpc_ServerStatsHandlers_Call) RunAndReturn added in v1.17.0

type Grpc_Server_Call

type Grpc_Server_Call struct {
	*mock.Call
}

Grpc_Server_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Server'

func (*Grpc_Server_Call) Return

func (_c *Grpc_Server_Call) Return(_a0 *grpc.Server) *Grpc_Server_Call

func (*Grpc_Server_Call) Run

func (_c *Grpc_Server_Call) Run(run func()) *Grpc_Server_Call

func (*Grpc_Server_Call) RunAndReturn

func (_c *Grpc_Server_Call) RunAndReturn(run func() *grpc.Server) *Grpc_Server_Call

type Grpc_Shutdown_Call added in v1.15.12

type Grpc_Shutdown_Call struct {
	*mock.Call
}

Grpc_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'

func (*Grpc_Shutdown_Call) Return added in v1.15.12

func (_c *Grpc_Shutdown_Call) Return(_a0 error) *Grpc_Shutdown_Call

func (*Grpc_Shutdown_Call) Run added in v1.15.12

func (_c *Grpc_Shutdown_Call) Run(run func(force ...bool)) *Grpc_Shutdown_Call

func (*Grpc_Shutdown_Call) RunAndReturn added in v1.15.12

func (_c *Grpc_Shutdown_Call) RunAndReturn(run func(...bool) error) *Grpc_Shutdown_Call

type Grpc_UnaryClientInterceptorGroups_Call

type Grpc_UnaryClientInterceptorGroups_Call struct {
	*mock.Call
}

Grpc_UnaryClientInterceptorGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnaryClientInterceptorGroups'

func (*Grpc_UnaryClientInterceptorGroups_Call) Return

func (*Grpc_UnaryClientInterceptorGroups_Call) Run

func (*Grpc_UnaryClientInterceptorGroups_Call) RunAndReturn

type Grpc_UnaryServerInterceptors_Call

type Grpc_UnaryServerInterceptors_Call struct {
	*mock.Call
}

Grpc_UnaryServerInterceptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnaryServerInterceptors'

func (*Grpc_UnaryServerInterceptors_Call) Return

func (*Grpc_UnaryServerInterceptors_Call) Run

func (*Grpc_UnaryServerInterceptors_Call) RunAndReturn

Jump to

Keyboard shortcuts

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