move to micro v4
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
20
mock.go
20
mock.go
@@ -8,10 +8,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
rutil "go.unistack.org/micro/v3/util/reflect"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
rutil "go.unistack.org/micro/v4/util/reflect"
|
||||
)
|
||||
|
||||
var _ client.Client = (*MockClient)(nil)
|
||||
@@ -115,14 +115,6 @@ func (c *MockClient) ExpectRequest(req client.Request) *ExpectedRequest {
|
||||
return e
|
||||
}
|
||||
|
||||
func (c *MockClient) BatchPublish(ctx context.Context, msgs []client.Message, opts ...client.PublishOption) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *MockClient) Publish(ctx context.Context, msg client.Message, opts ...client.PublishOption) error {
|
||||
return nil // c.opts.Broker.Publish()
|
||||
}
|
||||
|
||||
func (c *MockClient) Call(ctx context.Context, req client.Request, rsp interface{}, opts ...client.CallOption) error {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
@@ -237,10 +229,6 @@ func (c *MockClient) Options() client.Options {
|
||||
return c.opts
|
||||
}
|
||||
|
||||
func (c *MockClient) NewMessage(topic string, msg interface{}, opts ...client.MessageOption) client.Message {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *MockClient) NewRequest(service, method string, req interface{}, opts ...client.RequestOption) client.Request {
|
||||
return newRequest(service, method, req, c.opts.ContentType, opts...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user