当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
2 Star 0 Fork 1

JUMEI_ARCH/go-plugins
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
fargo_conn.go 8.55 KB
一键复制 编辑 原始数据 按行查看 历史
// This file was generated by counterfeiter
package mock
import (
"sync"
"github.com/hudl/fargo"
)
type FargoConnection struct {
RegisterInstanceStub func(*fargo.Instance) error
registerInstanceMutex sync.RWMutex
registerInstanceArgsForCall []struct {
arg1 *fargo.Instance
}
registerInstanceReturns struct {
result1 error
}
DeregisterInstanceStub func(*fargo.Instance) error
deregisterInstanceMutex sync.RWMutex
deregisterInstanceArgsForCall []struct {
arg1 *fargo.Instance
}
deregisterInstanceReturns struct {
result1 error
}
HeartBeatInstanceStub func(*fargo.Instance) error
heartBeatInstanceMutex sync.RWMutex
heartBeatInstanceArgsForCall []struct {
arg1 *fargo.Instance
}
heartBeatInstanceReturns struct {
result1 error
}
GetInstanceStub func(string, string) (*fargo.Instance, error)
getInstanceMutex sync.RWMutex
getInstanceArgsForCall []struct {
arg1 string
arg2 string
}
getInstanceReturns struct {
result1 *fargo.Instance
result2 error
}
GetAppStub func(string) (*fargo.Application, error)
getAppMutex sync.RWMutex
getAppArgsForCall []struct {
arg1 string
}
getAppReturns struct {
result1 *fargo.Application
result2 error
}
GetAppsStub func() (map[string]*fargo.Application, error)
getAppsMutex sync.RWMutex
getAppsArgsForCall []struct{}
getAppsReturns struct {
result1 map[string]*fargo.Application
result2 error
}
ScheduleAppUpdatesStub func(string, bool, <-chan struct{}) <-chan fargo.AppUpdate
scheduleAppUpdatesMutex sync.RWMutex
scheduleAppUpdatesArgsForCall []struct {
arg1 string
arg2 bool
arg3 <-chan struct{}
}
scheduleAppUpdatesReturns struct {
result1 <-chan fargo.AppUpdate
}
}
func (fake *FargoConnection) RegisterInstance(arg1 *fargo.Instance) error {
fake.registerInstanceMutex.Lock()
fake.registerInstanceArgsForCall = append(fake.registerInstanceArgsForCall, struct {
arg1 *fargo.Instance
}{arg1})
fake.registerInstanceMutex.Unlock()
if fake.RegisterInstanceStub != nil {
return fake.RegisterInstanceStub(arg1)
} else {
return fake.registerInstanceReturns.result1
}
}
func (fake *FargoConnection) RegisterInstanceCallCount() int {
fake.registerInstanceMutex.RLock()
defer fake.registerInstanceMutex.RUnlock()
return len(fake.registerInstanceArgsForCall)
}
func (fake *FargoConnection) RegisterInstanceArgsForCall(i int) *fargo.Instance {
fake.registerInstanceMutex.RLock()
defer fake.registerInstanceMutex.RUnlock()
return fake.registerInstanceArgsForCall[i].arg1
}
func (fake *FargoConnection) RegisterInstanceReturns(result1 error) {
fake.RegisterInstanceStub = nil
fake.registerInstanceReturns = struct {
result1 error
}{result1}
}
func (fake *FargoConnection) DeregisterInstance(arg1 *fargo.Instance) error {
fake.deregisterInstanceMutex.Lock()
fake.deregisterInstanceArgsForCall = append(fake.deregisterInstanceArgsForCall, struct {
arg1 *fargo.Instance
}{arg1})
fake.deregisterInstanceMutex.Unlock()
if fake.DeregisterInstanceStub != nil {
return fake.DeregisterInstanceStub(arg1)
} else {
return fake.deregisterInstanceReturns.result1
}
}
func (fake *FargoConnection) DeregisterInstanceCallCount() int {
fake.deregisterInstanceMutex.RLock()
defer fake.deregisterInstanceMutex.RUnlock()
return len(fake.deregisterInstanceArgsForCall)
}
func (fake *FargoConnection) DeregisterInstanceArgsForCall(i int) *fargo.Instance {
fake.deregisterInstanceMutex.RLock()
defer fake.deregisterInstanceMutex.RUnlock()
return fake.deregisterInstanceArgsForCall[i].arg1
}
func (fake *FargoConnection) DeregisterInstanceReturns(result1 error) {
fake.DeregisterInstanceStub = nil
fake.deregisterInstanceReturns = struct {
result1 error
}{result1}
}
func (fake *FargoConnection) HeartBeatInstance(arg1 *fargo.Instance) error {
fake.heartBeatInstanceMutex.Lock()
fake.heartBeatInstanceArgsForCall = append(fake.heartBeatInstanceArgsForCall, struct {
arg1 *fargo.Instance
}{arg1})
fake.heartBeatInstanceMutex.Unlock()
if fake.HeartBeatInstanceStub != nil {
return fake.HeartBeatInstanceStub(arg1)
} else {
return fake.heartBeatInstanceReturns.result1
}
}
func (fake *FargoConnection) HeartBeatInstanceCallCount() int {
fake.heartBeatInstanceMutex.RLock()
defer fake.heartBeatInstanceMutex.RUnlock()
return len(fake.heartBeatInstanceArgsForCall)
}
func (fake *FargoConnection) HeartBeatInstanceArgsForCall(i int) *fargo.Instance {
fake.heartBeatInstanceMutex.RLock()
defer fake.heartBeatInstanceMutex.RUnlock()
return fake.heartBeatInstanceArgsForCall[i].arg1
}
func (fake *FargoConnection) HeartBeatInstanceReturns(result1 error) {
fake.HeartBeatInstanceStub = nil
fake.heartBeatInstanceReturns = struct {
result1 error
}{result1}
}
func (fake *FargoConnection) GetInstance(arg1 string, arg2 string) (*fargo.Instance, error) {
fake.getInstanceMutex.Lock()
fake.getInstanceArgsForCall = append(fake.getInstanceArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.getInstanceMutex.Unlock()
if fake.GetInstanceStub != nil {
return fake.GetInstanceStub(arg1, arg2)
} else {
return fake.getInstanceReturns.result1, fake.getInstanceReturns.result2
}
}
func (fake *FargoConnection) GetInstanceCallCount() int {
fake.getInstanceMutex.RLock()
defer fake.getInstanceMutex.RUnlock()
return len(fake.getInstanceArgsForCall)
}
func (fake *FargoConnection) GetInstanceArgsForCall(i int) (string, string) {
fake.getInstanceMutex.RLock()
defer fake.getInstanceMutex.RUnlock()
return fake.getInstanceArgsForCall[i].arg1, fake.getInstanceArgsForCall[i].arg2
}
func (fake *FargoConnection) GetInstanceReturns(result1 *fargo.Instance, result2 error) {
fake.GetInstanceStub = nil
fake.getInstanceReturns = struct {
result1 *fargo.Instance
result2 error
}{result1, result2}
}
func (fake *FargoConnection) GetApp(arg1 string) (*fargo.Application, error) {
fake.getAppMutex.Lock()
fake.getAppArgsForCall = append(fake.getAppArgsForCall, struct {
arg1 string
}{arg1})
fake.getAppMutex.Unlock()
if fake.GetAppStub != nil {
return fake.GetAppStub(arg1)
} else {
return fake.getAppReturns.result1, fake.getAppReturns.result2
}
}
func (fake *FargoConnection) GetAppCallCount() int {
fake.getAppMutex.RLock()
defer fake.getAppMutex.RUnlock()
return len(fake.getAppArgsForCall)
}
func (fake *FargoConnection) GetAppArgsForCall(i int) string {
fake.getAppMutex.RLock()
defer fake.getAppMutex.RUnlock()
return fake.getAppArgsForCall[i].arg1
}
func (fake *FargoConnection) GetAppReturns(result1 *fargo.Application, result2 error) {
fake.GetAppStub = nil
fake.getAppReturns = struct {
result1 *fargo.Application
result2 error
}{result1, result2}
}
func (fake *FargoConnection) GetApps() (map[string]*fargo.Application, error) {
fake.getAppsMutex.Lock()
fake.getAppsArgsForCall = append(fake.getAppsArgsForCall, struct{}{})
fake.getAppsMutex.Unlock()
if fake.GetAppsStub != nil {
return fake.GetAppsStub()
} else {
return fake.getAppsReturns.result1, fake.getAppsReturns.result2
}
}
func (fake *FargoConnection) GetAppsCallCount() int {
fake.getAppsMutex.RLock()
defer fake.getAppsMutex.RUnlock()
return len(fake.getAppsArgsForCall)
}
func (fake *FargoConnection) GetAppsReturns(result1 map[string]*fargo.Application, result2 error) {
fake.GetAppsStub = nil
fake.getAppsReturns = struct {
result1 map[string]*fargo.Application
result2 error
}{result1, result2}
}
func (fake *FargoConnection) ScheduleAppUpdates(arg1 string, arg2 bool, arg3 <-chan struct{}) <-chan fargo.AppUpdate {
fake.scheduleAppUpdatesMutex.Lock()
fake.scheduleAppUpdatesArgsForCall = append(fake.scheduleAppUpdatesArgsForCall, struct {
arg1 string
arg2 bool
arg3 <-chan struct{}
}{arg1, arg2, arg3})
fake.scheduleAppUpdatesMutex.Unlock()
if fake.ScheduleAppUpdatesStub != nil {
return fake.ScheduleAppUpdatesStub(arg1, arg2, arg3)
} else {
return fake.scheduleAppUpdatesReturns.result1
}
}
func (fake *FargoConnection) ScheduleAppUpdatesCallCount() int {
fake.scheduleAppUpdatesMutex.RLock()
defer fake.scheduleAppUpdatesMutex.RUnlock()
return len(fake.scheduleAppUpdatesArgsForCall)
}
func (fake *FargoConnection) ScheduleAppUpdatesArgsForCall(i int) (string, bool, <-chan struct{}) {
fake.scheduleAppUpdatesMutex.RLock()
defer fake.scheduleAppUpdatesMutex.RUnlock()
return fake.scheduleAppUpdatesArgsForCall[i].arg1, fake.scheduleAppUpdatesArgsForCall[i].arg2, fake.scheduleAppUpdatesArgsForCall[i].arg3
}
func (fake *FargoConnection) ScheduleAppUpdatesReturns(result1 <-chan fargo.AppUpdate) {
fake.ScheduleAppUpdatesStub = nil
fake.scheduleAppUpdatesReturns = struct {
result1 <-chan fargo.AppUpdate
}{result1}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/JMArch/go-plugins.git
git@gitee.com:JMArch/go-plugins.git
JMArch
go-plugins
go-plugins
v0.1.0

搜索帮助

0d507c66 1850385 C8b1a773 1850385