3 Star 6 Fork 7

Gitee 极速下载/Hyperledger fabric

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hyperledger/fabric
Clone or Download
healthchecker.go 2.88 KB
Copy Edit Raw Blame History
// Code generated by counterfeiter. DO NOT EDIT.
package fakes
import (
"context"
"sync"
)
type HealthChecker struct {
HealthCheckStub func(context.Context) error
healthCheckMutex sync.RWMutex
healthCheckArgsForCall []struct {
arg1 context.Context
}
healthCheckReturns struct {
result1 error
}
healthCheckReturnsOnCall map[int]struct {
result1 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *HealthChecker) HealthCheck(arg1 context.Context) error {
fake.healthCheckMutex.Lock()
ret, specificReturn := fake.healthCheckReturnsOnCall[len(fake.healthCheckArgsForCall)]
fake.healthCheckArgsForCall = append(fake.healthCheckArgsForCall, struct {
arg1 context.Context
}{arg1})
fake.recordInvocation("HealthCheck", []interface{}{arg1})
fake.healthCheckMutex.Unlock()
if fake.HealthCheckStub != nil {
return fake.HealthCheckStub(arg1)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.healthCheckReturns
return fakeReturns.result1
}
func (fake *HealthChecker) HealthCheckCallCount() int {
fake.healthCheckMutex.RLock()
defer fake.healthCheckMutex.RUnlock()
return len(fake.healthCheckArgsForCall)
}
func (fake *HealthChecker) HealthCheckCalls(stub func(context.Context) error) {
fake.healthCheckMutex.Lock()
defer fake.healthCheckMutex.Unlock()
fake.HealthCheckStub = stub
}
func (fake *HealthChecker) HealthCheckArgsForCall(i int) context.Context {
fake.healthCheckMutex.RLock()
defer fake.healthCheckMutex.RUnlock()
argsForCall := fake.healthCheckArgsForCall[i]
return argsForCall.arg1
}
func (fake *HealthChecker) HealthCheckReturns(result1 error) {
fake.healthCheckMutex.Lock()
defer fake.healthCheckMutex.Unlock()
fake.HealthCheckStub = nil
fake.healthCheckReturns = struct {
result1 error
}{result1}
}
func (fake *HealthChecker) HealthCheckReturnsOnCall(i int, result1 error) {
fake.healthCheckMutex.Lock()
defer fake.healthCheckMutex.Unlock()
fake.HealthCheckStub = nil
if fake.healthCheckReturnsOnCall == nil {
fake.healthCheckReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.healthCheckReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *HealthChecker) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.healthCheckMutex.RLock()
defer fake.healthCheckMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *HealthChecker) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/fabric.git
git@gitee.com:mirrors/fabric.git
mirrors
fabric
Hyperledger fabric
v2.1.1

Search

D67c1975 1850385 1daf7b77 1850385