Documentation ¶
Overview ¶
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Index ¶
- Constants
- func MessagePipe(ctx context.Context, req *transport.StreamRequest, _ ...MessagePipeOption) (*transport.ClientStream, *transport.ServerStream, func(error), error)
- type ContextMatcher
- type ContextMatcherOption
- type ContextTTL
- type EchoHandler
- type EchoRouter
- type FakeResponseWriter
- type MessagePipeOption
- type MockClientConfig
- type MockClientConfigMockRecorder
- type MockClientConfigProvider
- type MockClientConfigProviderMockRecorder
- type MockInbound
- type MockInboundMockRecorder
- func (mr *MockInboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockInboundMockRecorder) SetRouter(arg0 interface{}) *gomock.Call
- func (mr *MockInboundMockRecorder) Start() *gomock.Call
- func (mr *MockInboundMockRecorder) Stop() *gomock.Call
- func (mr *MockInboundMockRecorder) Transports() *gomock.Call
- type MockOnewayHandler
- type MockOnewayHandlerMockRecorder
- type MockOnewayOutbound
- func (m *MockOnewayOutbound) CallOneway(arg0 context.Context, arg1 *transport.Request) (transport.Ack, error)
- func (m *MockOnewayOutbound) EXPECT() *MockOnewayOutboundMockRecorder
- func (m *MockOnewayOutbound) IsRunning() bool
- func (m *MockOnewayOutbound) Start() error
- func (m *MockOnewayOutbound) Stop() error
- func (m *MockOnewayOutbound) Transports() []transport.Transport
- type MockOnewayOutboundMockRecorder
- func (mr *MockOnewayOutboundMockRecorder) CallOneway(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) Start() *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) Stop() *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) Transports() *gomock.Call
- type MockRouteTable
- type MockRouteTableMockRecorder
- type MockRouter
- type MockRouterMockRecorder
- type MockStream
- func (m *MockStream) Context() context.Context
- func (m *MockStream) EXPECT() *MockStreamMockRecorder
- func (m *MockStream) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
- func (m *MockStream) Request() *transport.StreamRequest
- func (m *MockStream) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
- type MockStreamCloser
- func (m *MockStreamCloser) Close(arg0 context.Context) error
- func (m *MockStreamCloser) Context() context.Context
- func (m *MockStreamCloser) EXPECT() *MockStreamCloserMockRecorder
- func (m *MockStreamCloser) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
- func (m *MockStreamCloser) Request() *transport.StreamRequest
- func (m *MockStreamCloser) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
- type MockStreamCloserMockRecorder
- func (mr *MockStreamCloserMockRecorder) Close(arg0 interface{}) *gomock.Call
- func (mr *MockStreamCloserMockRecorder) Context() *gomock.Call
- func (mr *MockStreamCloserMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call
- func (mr *MockStreamCloserMockRecorder) Request() *gomock.Call
- func (mr *MockStreamCloserMockRecorder) SendMessage(arg0, arg1 interface{}) *gomock.Call
- type MockStreamHandler
- type MockStreamHandlerMockRecorder
- type MockStreamMockRecorder
- type MockStreamOutbound
- func (m *MockStreamOutbound) CallStream(arg0 context.Context, arg1 *transport.StreamRequest) (*transport.ClientStream, error)
- func (m *MockStreamOutbound) EXPECT() *MockStreamOutboundMockRecorder
- func (m *MockStreamOutbound) IsRunning() bool
- func (m *MockStreamOutbound) Start() error
- func (m *MockStreamOutbound) Stop() error
- func (m *MockStreamOutbound) Transports() []transport.Transport
- type MockStreamOutboundMockRecorder
- func (mr *MockStreamOutboundMockRecorder) CallStream(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) Start() *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) Stop() *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) Transports() *gomock.Call
- type MockTransport
- type MockTransportMockRecorder
- type MockUnaryHandler
- type MockUnaryHandlerMockRecorder
- type MockUnaryOutbound
- func (m *MockUnaryOutbound) Call(arg0 context.Context, arg1 *transport.Request) (*transport.Response, error)
- func (m *MockUnaryOutbound) EXPECT() *MockUnaryOutboundMockRecorder
- func (m *MockUnaryOutbound) IsRunning() bool
- func (m *MockUnaryOutbound) Start() error
- func (m *MockUnaryOutbound) Stop() error
- func (m *MockUnaryOutbound) Transports() []transport.Transport
- type MockUnaryOutboundMockRecorder
- func (mr *MockUnaryOutboundMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) Start() *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) Stop() *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) Transports() *gomock.Call
- type RequestMatcher
- type ResponseMatcher
Constants ¶
const DefaultTTLDelta = 100 * time.Millisecond
DefaultTTLDelta is the default TTLDelta used by RequestMatchers.
Variables ¶
This section is empty.
Functions ¶
func MessagePipe ¶ added in v1.43.0
func MessagePipe(ctx context.Context, req *transport.StreamRequest, _ ...MessagePipeOption) (*transport.ClientStream, *transport.ServerStream, func(error), error)
MessagePipe creates an in-memory client and server message stream pair.
The third return value is a function that the server side uses to transport the end of stream error, if not nil. Calling the finish function with nil is valid.
finish(streamHandler.HandleStream(serverStream))
Types ¶
type ContextMatcher ¶
ContextMatcher is a Matcher for verifying that a context's deadline is within expected bounds: the current time, plus a TTL, plus or minus some tolerance.
func NewContextMatcher ¶
func NewContextMatcher(t *testing.T, options ...ContextMatcherOption) *ContextMatcher
NewContextMatcher creates a ContextMatcher to verify properties about a Context.
func (*ContextMatcher) Matches ¶
func (c *ContextMatcher) Matches(got interface{}) bool
Matches a context against an expected context, returning true only if the given object is a context with a deadline that is now, plus the expected TTL, plus or minus some tolerance.
func (*ContextMatcher) String ¶
func (c *ContextMatcher) String() string
type ContextMatcherOption ¶
type ContextMatcherOption interface {
// contains filtered or unexported methods
}
ContextMatcherOption customizes the behavior of a ContextMatcher.
type ContextTTL ¶
ContextTTL requires that a Context have the given TTL on it, with a tolerance of TTLDelta.
type EchoHandler ¶ added in v1.5.0
type EchoHandler struct{}
EchoHandler is a unary handler that echoes the request body on the response body for any inbound request.
func (EchoHandler) Handle ¶ added in v1.5.0
func (EchoHandler) Handle(ctx context.Context, req *transport.Request, resw transport.ResponseWriter) error
Handle handles an inbound request by copying the request body to the response body.
type EchoRouter ¶ added in v1.5.0
type EchoRouter struct{}
EchoRouter is a router that echoes all unary inbound requests, with no explicit procedures.
func (EchoRouter) Choose ¶ added in v1.5.0
func (EchoRouter) Choose(ctx context.Context, req *transport.Request) (transport.HandlerSpec, error)
Choose always returns a unary echo handler.
func (EchoRouter) Procedures ¶ added in v1.5.0
func (EchoRouter) Procedures() []transport.Procedure
Procedures returns no explicitly supported procedures.
type FakeResponseWriter ¶
type FakeResponseWriter struct { IsApplicationError bool Headers transport.Headers Body bytes.Buffer }
FakeResponseWriter is a ResponseWriter that records the headers and the body written to it.
func (*FakeResponseWriter) AddHeaders ¶
func (fw *FakeResponseWriter) AddHeaders(h transport.Headers)
AddHeaders for FakeResponseWriter.
func (*FakeResponseWriter) SetApplicationError ¶
func (fw *FakeResponseWriter) SetApplicationError()
SetApplicationError for FakeResponseWriter.
type MessagePipeOption ¶ added in v1.43.0
type MessagePipeOption interface {
// contains filtered or unexported methods
}
MessagePipeOption is an option for the MessagePipe constructor.
type MockClientConfig ¶
type MockClientConfig struct {
// contains filtered or unexported fields
}
MockClientConfig is a mock of ClientConfig interface
func NewMockClientConfig ¶
func NewMockClientConfig(ctrl *gomock.Controller) *MockClientConfig
NewMockClientConfig creates a new mock instance
func (*MockClientConfig) Caller ¶
func (m *MockClientConfig) Caller() string
Caller mocks base method
func (*MockClientConfig) EXPECT ¶
func (m *MockClientConfig) EXPECT() *MockClientConfigMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClientConfig) GetOnewayOutbound ¶
func (m *MockClientConfig) GetOnewayOutbound() transport.OnewayOutbound
GetOnewayOutbound mocks base method
func (*MockClientConfig) GetUnaryOutbound ¶
func (m *MockClientConfig) GetUnaryOutbound() transport.UnaryOutbound
GetUnaryOutbound mocks base method
func (*MockClientConfig) Service ¶
func (m *MockClientConfig) Service() string
Service mocks base method
type MockClientConfigMockRecorder ¶ added in v1.10.0
type MockClientConfigMockRecorder struct {
// contains filtered or unexported fields
}
MockClientConfigMockRecorder is the mock recorder for MockClientConfig
func (*MockClientConfigMockRecorder) Caller ¶ added in v1.10.0
func (mr *MockClientConfigMockRecorder) Caller() *gomock.Call
Caller indicates an expected call of Caller
func (*MockClientConfigMockRecorder) GetOnewayOutbound ¶ added in v1.10.0
func (mr *MockClientConfigMockRecorder) GetOnewayOutbound() *gomock.Call
GetOnewayOutbound indicates an expected call of GetOnewayOutbound
func (*MockClientConfigMockRecorder) GetUnaryOutbound ¶ added in v1.10.0
func (mr *MockClientConfigMockRecorder) GetUnaryOutbound() *gomock.Call
GetUnaryOutbound indicates an expected call of GetUnaryOutbound
func (*MockClientConfigMockRecorder) Service ¶ added in v1.10.0
func (mr *MockClientConfigMockRecorder) Service() *gomock.Call
Service indicates an expected call of Service
type MockClientConfigProvider ¶
type MockClientConfigProvider struct {
// contains filtered or unexported fields
}
MockClientConfigProvider is a mock of ClientConfigProvider interface
func NewMockClientConfigProvider ¶
func NewMockClientConfigProvider(ctrl *gomock.Controller) *MockClientConfigProvider
NewMockClientConfigProvider creates a new mock instance
func (*MockClientConfigProvider) ClientConfig ¶
func (m *MockClientConfigProvider) ClientConfig(arg0 string) transport.ClientConfig
ClientConfig mocks base method
func (*MockClientConfigProvider) EXPECT ¶
func (m *MockClientConfigProvider) EXPECT() *MockClientConfigProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockClientConfigProviderMockRecorder ¶ added in v1.10.0
type MockClientConfigProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockClientConfigProviderMockRecorder is the mock recorder for MockClientConfigProvider
func (*MockClientConfigProviderMockRecorder) ClientConfig ¶ added in v1.10.0
func (mr *MockClientConfigProviderMockRecorder) ClientConfig(arg0 interface{}) *gomock.Call
ClientConfig indicates an expected call of ClientConfig
type MockInbound ¶
type MockInbound struct {
// contains filtered or unexported fields
}
MockInbound is a mock of Inbound interface
func NewMockInbound ¶
func NewMockInbound(ctrl *gomock.Controller) *MockInbound
NewMockInbound creates a new mock instance
func (*MockInbound) EXPECT ¶
func (m *MockInbound) EXPECT() *MockInboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockInbound) SetRouter ¶
func (m *MockInbound) SetRouter(arg0 transport.Router)
SetRouter mocks base method
func (*MockInbound) Transports ¶
func (m *MockInbound) Transports() []transport.Transport
Transports mocks base method
type MockInboundMockRecorder ¶ added in v1.10.0
type MockInboundMockRecorder struct {
// contains filtered or unexported fields
}
MockInboundMockRecorder is the mock recorder for MockInbound
func (*MockInboundMockRecorder) IsRunning ¶ added in v1.10.0
func (mr *MockInboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockInboundMockRecorder) SetRouter ¶ added in v1.10.0
func (mr *MockInboundMockRecorder) SetRouter(arg0 interface{}) *gomock.Call
SetRouter indicates an expected call of SetRouter
func (*MockInboundMockRecorder) Start ¶ added in v1.10.0
func (mr *MockInboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockInboundMockRecorder) Stop ¶ added in v1.10.0
func (mr *MockInboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockInboundMockRecorder) Transports ¶ added in v1.10.0
func (mr *MockInboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type MockOnewayHandler ¶
type MockOnewayHandler struct {
// contains filtered or unexported fields
}
MockOnewayHandler is a mock of OnewayHandler interface
func NewMockOnewayHandler ¶
func NewMockOnewayHandler(ctrl *gomock.Controller) *MockOnewayHandler
NewMockOnewayHandler creates a new mock instance
func (*MockOnewayHandler) EXPECT ¶
func (m *MockOnewayHandler) EXPECT() *MockOnewayHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockOnewayHandler) HandleOneway ¶
HandleOneway mocks base method
type MockOnewayHandlerMockRecorder ¶ added in v1.10.0
type MockOnewayHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockOnewayHandlerMockRecorder is the mock recorder for MockOnewayHandler
func (*MockOnewayHandlerMockRecorder) HandleOneway ¶ added in v1.10.0
func (mr *MockOnewayHandlerMockRecorder) HandleOneway(arg0, arg1 interface{}) *gomock.Call
HandleOneway indicates an expected call of HandleOneway
type MockOnewayOutbound ¶
type MockOnewayOutbound struct {
// contains filtered or unexported fields
}
MockOnewayOutbound is a mock of OnewayOutbound interface
func NewMockOnewayOutbound ¶
func NewMockOnewayOutbound(ctrl *gomock.Controller) *MockOnewayOutbound
NewMockOnewayOutbound creates a new mock instance
func (*MockOnewayOutbound) CallOneway ¶
func (m *MockOnewayOutbound) CallOneway(arg0 context.Context, arg1 *transport.Request) (transport.Ack, error)
CallOneway mocks base method
func (*MockOnewayOutbound) EXPECT ¶
func (m *MockOnewayOutbound) EXPECT() *MockOnewayOutboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockOnewayOutbound) IsRunning ¶
func (m *MockOnewayOutbound) IsRunning() bool
IsRunning mocks base method
func (*MockOnewayOutbound) Start ¶
func (m *MockOnewayOutbound) Start() error
Start mocks base method
func (*MockOnewayOutbound) Transports ¶
func (m *MockOnewayOutbound) Transports() []transport.Transport
Transports mocks base method
type MockOnewayOutboundMockRecorder ¶ added in v1.10.0
type MockOnewayOutboundMockRecorder struct {
// contains filtered or unexported fields
}
MockOnewayOutboundMockRecorder is the mock recorder for MockOnewayOutbound
func (*MockOnewayOutboundMockRecorder) CallOneway ¶ added in v1.10.0
func (mr *MockOnewayOutboundMockRecorder) CallOneway(arg0, arg1 interface{}) *gomock.Call
CallOneway indicates an expected call of CallOneway
func (*MockOnewayOutboundMockRecorder) IsRunning ¶ added in v1.10.0
func (mr *MockOnewayOutboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockOnewayOutboundMockRecorder) Start ¶ added in v1.10.0
func (mr *MockOnewayOutboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockOnewayOutboundMockRecorder) Stop ¶ added in v1.10.0
func (mr *MockOnewayOutboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockOnewayOutboundMockRecorder) Transports ¶ added in v1.10.0
func (mr *MockOnewayOutboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type MockRouteTable ¶
type MockRouteTable struct {
// contains filtered or unexported fields
}
MockRouteTable is a mock of RouteTable interface
func NewMockRouteTable ¶
func NewMockRouteTable(ctrl *gomock.Controller) *MockRouteTable
NewMockRouteTable creates a new mock instance
func (*MockRouteTable) Choose ¶
func (m *MockRouteTable) Choose(arg0 context.Context, arg1 *transport.Request) (transport.HandlerSpec, error)
Choose mocks base method
func (*MockRouteTable) EXPECT ¶
func (m *MockRouteTable) EXPECT() *MockRouteTableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRouteTable) Procedures ¶
func (m *MockRouteTable) Procedures() []transport.Procedure
Procedures mocks base method
func (*MockRouteTable) Register ¶
func (m *MockRouteTable) Register(arg0 []transport.Procedure)
Register mocks base method
type MockRouteTableMockRecorder ¶ added in v1.10.0
type MockRouteTableMockRecorder struct {
// contains filtered or unexported fields
}
MockRouteTableMockRecorder is the mock recorder for MockRouteTable
func (*MockRouteTableMockRecorder) Choose ¶ added in v1.10.0
func (mr *MockRouteTableMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call
Choose indicates an expected call of Choose
func (*MockRouteTableMockRecorder) Procedures ¶ added in v1.10.0
func (mr *MockRouteTableMockRecorder) Procedures() *gomock.Call
Procedures indicates an expected call of Procedures
func (*MockRouteTableMockRecorder) Register ¶ added in v1.10.0
func (mr *MockRouteTableMockRecorder) Register(arg0 interface{}) *gomock.Call
Register indicates an expected call of Register
type MockRouter ¶
type MockRouter struct {
// contains filtered or unexported fields
}
MockRouter is a mock of Router interface
func NewMockRouter ¶
func NewMockRouter(ctrl *gomock.Controller) *MockRouter
NewMockRouter creates a new mock instance
func (*MockRouter) Choose ¶
func (m *MockRouter) Choose(arg0 context.Context, arg1 *transport.Request) (transport.HandlerSpec, error)
Choose mocks base method
func (*MockRouter) EXPECT ¶
func (m *MockRouter) EXPECT() *MockRouterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRouter) Procedures ¶
func (m *MockRouter) Procedures() []transport.Procedure
Procedures mocks base method
type MockRouterMockRecorder ¶ added in v1.10.0
type MockRouterMockRecorder struct {
// contains filtered or unexported fields
}
MockRouterMockRecorder is the mock recorder for MockRouter
func (*MockRouterMockRecorder) Choose ¶ added in v1.10.0
func (mr *MockRouterMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call
Choose indicates an expected call of Choose
func (*MockRouterMockRecorder) Procedures ¶ added in v1.10.0
func (mr *MockRouterMockRecorder) Procedures() *gomock.Call
Procedures indicates an expected call of Procedures
type MockStream ¶ added in v1.27.0
type MockStream struct {
// contains filtered or unexported fields
}
MockStream is a mock of Stream interface
func NewMockStream ¶ added in v1.27.0
func NewMockStream(ctrl *gomock.Controller) *MockStream
NewMockStream creates a new mock instance
func (*MockStream) Context ¶ added in v1.27.0
func (m *MockStream) Context() context.Context
Context mocks base method
func (*MockStream) EXPECT ¶ added in v1.27.0
func (m *MockStream) EXPECT() *MockStreamMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStream) ReceiveMessage ¶ added in v1.27.0
func (m *MockStream) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
ReceiveMessage mocks base method
func (*MockStream) Request ¶ added in v1.27.0
func (m *MockStream) Request() *transport.StreamRequest
Request mocks base method
func (*MockStream) SendMessage ¶ added in v1.27.0
func (m *MockStream) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
SendMessage mocks base method
type MockStreamCloser ¶ added in v1.27.0
type MockStreamCloser struct {
// contains filtered or unexported fields
}
MockStreamCloser is a mock of StreamCloser interface
func NewMockStreamCloser ¶ added in v1.27.0
func NewMockStreamCloser(ctrl *gomock.Controller) *MockStreamCloser
NewMockStreamCloser creates a new mock instance
func (*MockStreamCloser) Close ¶ added in v1.27.0
func (m *MockStreamCloser) Close(arg0 context.Context) error
Close mocks base method
func (*MockStreamCloser) Context ¶ added in v1.27.0
func (m *MockStreamCloser) Context() context.Context
Context mocks base method
func (*MockStreamCloser) EXPECT ¶ added in v1.27.0
func (m *MockStreamCloser) EXPECT() *MockStreamCloserMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamCloser) ReceiveMessage ¶ added in v1.27.0
func (m *MockStreamCloser) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
ReceiveMessage mocks base method
func (*MockStreamCloser) Request ¶ added in v1.27.0
func (m *MockStreamCloser) Request() *transport.StreamRequest
Request mocks base method
func (*MockStreamCloser) SendMessage ¶ added in v1.27.0
func (m *MockStreamCloser) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
SendMessage mocks base method
type MockStreamCloserMockRecorder ¶ added in v1.27.0
type MockStreamCloserMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamCloserMockRecorder is the mock recorder for MockStreamCloser
func (*MockStreamCloserMockRecorder) Close ¶ added in v1.27.0
func (mr *MockStreamCloserMockRecorder) Close(arg0 interface{}) *gomock.Call
Close indicates an expected call of Close
func (*MockStreamCloserMockRecorder) Context ¶ added in v1.27.0
func (mr *MockStreamCloserMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context
func (*MockStreamCloserMockRecorder) ReceiveMessage ¶ added in v1.27.0
func (mr *MockStreamCloserMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call
ReceiveMessage indicates an expected call of ReceiveMessage
func (*MockStreamCloserMockRecorder) Request ¶ added in v1.27.0
func (mr *MockStreamCloserMockRecorder) Request() *gomock.Call
Request indicates an expected call of Request
func (*MockStreamCloserMockRecorder) SendMessage ¶ added in v1.27.0
func (mr *MockStreamCloserMockRecorder) SendMessage(arg0, arg1 interface{}) *gomock.Call
SendMessage indicates an expected call of SendMessage
type MockStreamHandler ¶ added in v1.27.0
type MockStreamHandler struct {
// contains filtered or unexported fields
}
MockStreamHandler is a mock of StreamHandler interface
func NewMockStreamHandler ¶ added in v1.27.0
func NewMockStreamHandler(ctrl *gomock.Controller) *MockStreamHandler
NewMockStreamHandler creates a new mock instance
func (*MockStreamHandler) EXPECT ¶ added in v1.27.0
func (m *MockStreamHandler) EXPECT() *MockStreamHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamHandler) HandleStream ¶ added in v1.27.0
func (m *MockStreamHandler) HandleStream(arg0 *transport.ServerStream) error
HandleStream mocks base method
type MockStreamHandlerMockRecorder ¶ added in v1.27.0
type MockStreamHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamHandlerMockRecorder is the mock recorder for MockStreamHandler
func (*MockStreamHandlerMockRecorder) HandleStream ¶ added in v1.27.0
func (mr *MockStreamHandlerMockRecorder) HandleStream(arg0 interface{}) *gomock.Call
HandleStream indicates an expected call of HandleStream
type MockStreamMockRecorder ¶ added in v1.27.0
type MockStreamMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamMockRecorder is the mock recorder for MockStream
func (*MockStreamMockRecorder) Context ¶ added in v1.27.0
func (mr *MockStreamMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context
func (*MockStreamMockRecorder) ReceiveMessage ¶ added in v1.27.0
func (mr *MockStreamMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call
ReceiveMessage indicates an expected call of ReceiveMessage
func (*MockStreamMockRecorder) Request ¶ added in v1.27.0
func (mr *MockStreamMockRecorder) Request() *gomock.Call
Request indicates an expected call of Request
func (*MockStreamMockRecorder) SendMessage ¶ added in v1.27.0
func (mr *MockStreamMockRecorder) SendMessage(arg0, arg1 interface{}) *gomock.Call
SendMessage indicates an expected call of SendMessage
type MockStreamOutbound ¶ added in v1.27.0
type MockStreamOutbound struct {
// contains filtered or unexported fields
}
MockStreamOutbound is a mock of StreamOutbound interface
func NewMockStreamOutbound ¶ added in v1.27.0
func NewMockStreamOutbound(ctrl *gomock.Controller) *MockStreamOutbound
NewMockStreamOutbound creates a new mock instance
func (*MockStreamOutbound) CallStream ¶ added in v1.27.0
func (m *MockStreamOutbound) CallStream(arg0 context.Context, arg1 *transport.StreamRequest) (*transport.ClientStream, error)
CallStream mocks base method
func (*MockStreamOutbound) EXPECT ¶ added in v1.27.0
func (m *MockStreamOutbound) EXPECT() *MockStreamOutboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamOutbound) IsRunning ¶ added in v1.27.0
func (m *MockStreamOutbound) IsRunning() bool
IsRunning mocks base method
func (*MockStreamOutbound) Start ¶ added in v1.27.0
func (m *MockStreamOutbound) Start() error
Start mocks base method
func (*MockStreamOutbound) Stop ¶ added in v1.27.0
func (m *MockStreamOutbound) Stop() error
Stop mocks base method
func (*MockStreamOutbound) Transports ¶ added in v1.27.0
func (m *MockStreamOutbound) Transports() []transport.Transport
Transports mocks base method
type MockStreamOutboundMockRecorder ¶ added in v1.27.0
type MockStreamOutboundMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamOutboundMockRecorder is the mock recorder for MockStreamOutbound
func (*MockStreamOutboundMockRecorder) CallStream ¶ added in v1.27.0
func (mr *MockStreamOutboundMockRecorder) CallStream(arg0, arg1 interface{}) *gomock.Call
CallStream indicates an expected call of CallStream
func (*MockStreamOutboundMockRecorder) IsRunning ¶ added in v1.27.0
func (mr *MockStreamOutboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockStreamOutboundMockRecorder) Start ¶ added in v1.27.0
func (mr *MockStreamOutboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockStreamOutboundMockRecorder) Stop ¶ added in v1.27.0
func (mr *MockStreamOutboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockStreamOutboundMockRecorder) Transports ¶ added in v1.27.0
func (mr *MockStreamOutboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type MockTransport ¶ added in v1.7.0
type MockTransport struct {
// contains filtered or unexported fields
}
MockTransport is a mock of Transport interface
func NewMockTransport ¶ added in v1.7.0
func NewMockTransport(ctrl *gomock.Controller) *MockTransport
NewMockTransport creates a new mock instance
func (*MockTransport) EXPECT ¶ added in v1.7.0
func (m *MockTransport) EXPECT() *MockTransportMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTransport) IsRunning ¶ added in v1.7.0
func (m *MockTransport) IsRunning() bool
IsRunning mocks base method
func (*MockTransport) Start ¶ added in v1.7.0
func (m *MockTransport) Start() error
Start mocks base method
func (*MockTransport) Stop ¶ added in v1.7.0
func (m *MockTransport) Stop() error
Stop mocks base method
type MockTransportMockRecorder ¶ added in v1.10.0
type MockTransportMockRecorder struct {
// contains filtered or unexported fields
}
MockTransportMockRecorder is the mock recorder for MockTransport
func (*MockTransportMockRecorder) IsRunning ¶ added in v1.10.0
func (mr *MockTransportMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockTransportMockRecorder) Start ¶ added in v1.10.0
func (mr *MockTransportMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockTransportMockRecorder) Stop ¶ added in v1.10.0
func (mr *MockTransportMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
type MockUnaryHandler ¶
type MockUnaryHandler struct {
// contains filtered or unexported fields
}
MockUnaryHandler is a mock of UnaryHandler interface
func NewMockUnaryHandler ¶
func NewMockUnaryHandler(ctrl *gomock.Controller) *MockUnaryHandler
NewMockUnaryHandler creates a new mock instance
func (*MockUnaryHandler) EXPECT ¶
func (m *MockUnaryHandler) EXPECT() *MockUnaryHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnaryHandler) Handle ¶
func (m *MockUnaryHandler) Handle(arg0 context.Context, arg1 *transport.Request, arg2 transport.ResponseWriter) error
Handle mocks base method
type MockUnaryHandlerMockRecorder ¶ added in v1.10.0
type MockUnaryHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnaryHandlerMockRecorder is the mock recorder for MockUnaryHandler
func (*MockUnaryHandlerMockRecorder) Handle ¶ added in v1.10.0
func (mr *MockUnaryHandlerMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call
Handle indicates an expected call of Handle
type MockUnaryOutbound ¶
type MockUnaryOutbound struct {
// contains filtered or unexported fields
}
MockUnaryOutbound is a mock of UnaryOutbound interface
func NewMockUnaryOutbound ¶
func NewMockUnaryOutbound(ctrl *gomock.Controller) *MockUnaryOutbound
NewMockUnaryOutbound creates a new mock instance
func (*MockUnaryOutbound) Call ¶
func (m *MockUnaryOutbound) Call(arg0 context.Context, arg1 *transport.Request) (*transport.Response, error)
Call mocks base method
func (*MockUnaryOutbound) EXPECT ¶
func (m *MockUnaryOutbound) EXPECT() *MockUnaryOutboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnaryOutbound) IsRunning ¶
func (m *MockUnaryOutbound) IsRunning() bool
IsRunning mocks base method
func (*MockUnaryOutbound) Transports ¶
func (m *MockUnaryOutbound) Transports() []transport.Transport
Transports mocks base method
type MockUnaryOutboundMockRecorder ¶ added in v1.10.0
type MockUnaryOutboundMockRecorder struct {
// contains filtered or unexported fields
}
MockUnaryOutboundMockRecorder is the mock recorder for MockUnaryOutbound
func (*MockUnaryOutboundMockRecorder) Call ¶ added in v1.10.0
func (mr *MockUnaryOutboundMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call
Call indicates an expected call of Call
func (*MockUnaryOutboundMockRecorder) IsRunning ¶ added in v1.10.0
func (mr *MockUnaryOutboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockUnaryOutboundMockRecorder) Start ¶ added in v1.10.0
func (mr *MockUnaryOutboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockUnaryOutboundMockRecorder) Stop ¶ added in v1.10.0
func (mr *MockUnaryOutboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockUnaryOutboundMockRecorder) Transports ¶ added in v1.10.0
func (mr *MockUnaryOutboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type RequestMatcher ¶
type RequestMatcher struct {
// contains filtered or unexported fields
}
RequestMatcher may be used in gomock argument lists to assert that two requests match.
Requests are considered to be matching if: all their primitive parameters match, the headers of the received request include all the headers from the source request, and the contents of the request bodies are the same.
func NewRequestMatcher ¶
func NewRequestMatcher(t *testing.T, r *transport.Request) RequestMatcher
NewRequestMatcher constructs a new RequestMatcher from the given testing.T and request.
The request's contents are read in their entirety and replaced with a bytes.Reader.
func (RequestMatcher) Matches ¶
func (m RequestMatcher) Matches(got interface{}) bool
Matches checks if the given object matches the Request provided in NewRequestMatcher.
func (RequestMatcher) String ¶
func (m RequestMatcher) String() string
type ResponseMatcher ¶
type ResponseMatcher struct {
// contains filtered or unexported fields
}
ResponseMatcher is similar to RequestMatcher but for responses.
func NewResponseMatcher ¶
func NewResponseMatcher(t *testing.T, r *transport.Response) ResponseMatcher
NewResponseMatcher builds a new ResponseMatcher that verifies that responses match the given Response.
func (ResponseMatcher) Matches ¶
func (m ResponseMatcher) Matches(got interface{}) bool
Matches checks if the given object matches the Response provided in NewResponseMatcher.