Vasiliy Tolstov
06136312bb
* regen files with never protoc * rewrite import path Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
29 lines
508 B
Go
29 lines
508 B
Go
package mock
|
|
|
|
import (
|
|
"github.com/unistack-org/micro/v3/registry"
|
|
"github.com/unistack-org/micro/v3/server"
|
|
)
|
|
|
|
type MockSubscriber struct {
|
|
Id string
|
|
Opts server.SubscriberOptions
|
|
Sub interface{}
|
|
}
|
|
|
|
func (m *MockSubscriber) Topic() string {
|
|
return m.Id
|
|
}
|
|
|
|
func (m *MockSubscriber) Subscriber() interface{} {
|
|
return m.Sub
|
|
}
|
|
|
|
func (m *MockSubscriber) Endpoints() []*registry.Endpoint {
|
|
return []*registry.Endpoint{}
|
|
}
|
|
|
|
func (m *MockSubscriber) Options() server.SubscriberOptions {
|
|
return m.Opts
|
|
}
|