3 Star 6 Fork 7

Gitee 极速下载 / Hyperledger fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hyperledger/fabric
克隆/下载
channel_support.go 17.09 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
sync "sync"
broadcast "github.com/hyperledger/fabric/orderer/common/broadcast"
msgprocessor "github.com/hyperledger/fabric/orderer/common/msgprocessor"
common "github.com/hyperledger/fabric/protos/common"
)
type ChannelSupport struct {
ClassifyMsgStub func(*common.ChannelHeader) msgprocessor.Classification
classifyMsgMutex sync.RWMutex
classifyMsgArgsForCall []struct {
arg1 *common.ChannelHeader
}
classifyMsgReturns struct {
result1 msgprocessor.Classification
}
classifyMsgReturnsOnCall map[int]struct {
result1 msgprocessor.Classification
}
ConfigureStub func(*common.Envelope, uint64) error
configureMutex sync.RWMutex
configureArgsForCall []struct {
arg1 *common.Envelope
arg2 uint64
}
configureReturns struct {
result1 error
}
configureReturnsOnCall map[int]struct {
result1 error
}
OrderStub func(*common.Envelope, uint64) error
orderMutex sync.RWMutex
orderArgsForCall []struct {
arg1 *common.Envelope
arg2 uint64
}
orderReturns struct {
result1 error
}
orderReturnsOnCall map[int]struct {
result1 error
}
ProcessConfigMsgStub func(*common.Envelope) (*common.Envelope, uint64, error)
processConfigMsgMutex sync.RWMutex
processConfigMsgArgsForCall []struct {
arg1 *common.Envelope
}
processConfigMsgReturns struct {
result1 *common.Envelope
result2 uint64
result3 error
}
processConfigMsgReturnsOnCall map[int]struct {
result1 *common.Envelope
result2 uint64
result3 error
}
ProcessConfigUpdateMsgStub func(*common.Envelope) (*common.Envelope, uint64, error)
processConfigUpdateMsgMutex sync.RWMutex
processConfigUpdateMsgArgsForCall []struct {
arg1 *common.Envelope
}
processConfigUpdateMsgReturns struct {
result1 *common.Envelope
result2 uint64
result3 error
}
processConfigUpdateMsgReturnsOnCall map[int]struct {
result1 *common.Envelope
result2 uint64
result3 error
}
ProcessNormalMsgStub func(*common.Envelope) (uint64, error)
processNormalMsgMutex sync.RWMutex
processNormalMsgArgsForCall []struct {
arg1 *common.Envelope
}
processNormalMsgReturns struct {
result1 uint64
result2 error
}
processNormalMsgReturnsOnCall map[int]struct {
result1 uint64
result2 error
}
WaitReadyStub func() error
waitReadyMutex sync.RWMutex
waitReadyArgsForCall []struct {
}
waitReadyReturns struct {
result1 error
}
waitReadyReturnsOnCall map[int]struct {
result1 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *ChannelSupport) ClassifyMsg(arg1 *common.ChannelHeader) msgprocessor.Classification {
fake.classifyMsgMutex.Lock()
ret, specificReturn := fake.classifyMsgReturnsOnCall[len(fake.classifyMsgArgsForCall)]
fake.classifyMsgArgsForCall = append(fake.classifyMsgArgsForCall, struct {
arg1 *common.ChannelHeader
}{arg1})
fake.recordInvocation("ClassifyMsg", []interface{}{arg1})
fake.classifyMsgMutex.Unlock()
if fake.ClassifyMsgStub != nil {
return fake.ClassifyMsgStub(arg1)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.classifyMsgReturns
return fakeReturns.result1
}
func (fake *ChannelSupport) ClassifyMsgCallCount() int {
fake.classifyMsgMutex.RLock()
defer fake.classifyMsgMutex.RUnlock()
return len(fake.classifyMsgArgsForCall)
}
func (fake *ChannelSupport) ClassifyMsgCalls(stub func(*common.ChannelHeader) msgprocessor.Classification) {
fake.classifyMsgMutex.Lock()
defer fake.classifyMsgMutex.Unlock()
fake.ClassifyMsgStub = stub
}
func (fake *ChannelSupport) ClassifyMsgArgsForCall(i int) *common.ChannelHeader {
fake.classifyMsgMutex.RLock()
defer fake.classifyMsgMutex.RUnlock()
argsForCall := fake.classifyMsgArgsForCall[i]
return argsForCall.arg1
}
func (fake *ChannelSupport) ClassifyMsgReturns(result1 msgprocessor.Classification) {
fake.classifyMsgMutex.Lock()
defer fake.classifyMsgMutex.Unlock()
fake.ClassifyMsgStub = nil
fake.classifyMsgReturns = struct {
result1 msgprocessor.Classification
}{result1}
}
func (fake *ChannelSupport) ClassifyMsgReturnsOnCall(i int, result1 msgprocessor.Classification) {
fake.classifyMsgMutex.Lock()
defer fake.classifyMsgMutex.Unlock()
fake.ClassifyMsgStub = nil
if fake.classifyMsgReturnsOnCall == nil {
fake.classifyMsgReturnsOnCall = make(map[int]struct {
result1 msgprocessor.Classification
})
}
fake.classifyMsgReturnsOnCall[i] = struct {
result1 msgprocessor.Classification
}{result1}
}
func (fake *ChannelSupport) Configure(arg1 *common.Envelope, arg2 uint64) error {
fake.configureMutex.Lock()
ret, specificReturn := fake.configureReturnsOnCall[len(fake.configureArgsForCall)]
fake.configureArgsForCall = append(fake.configureArgsForCall, struct {
arg1 *common.Envelope
arg2 uint64
}{arg1, arg2})
fake.recordInvocation("Configure", []interface{}{arg1, arg2})
fake.configureMutex.Unlock()
if fake.ConfigureStub != nil {
return fake.ConfigureStub(arg1, arg2)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.configureReturns
return fakeReturns.result1
}
func (fake *ChannelSupport) ConfigureCallCount() int {
fake.configureMutex.RLock()
defer fake.configureMutex.RUnlock()
return len(fake.configureArgsForCall)
}
func (fake *ChannelSupport) ConfigureCalls(stub func(*common.Envelope, uint64) error) {
fake.configureMutex.Lock()
defer fake.configureMutex.Unlock()
fake.ConfigureStub = stub
}
func (fake *ChannelSupport) ConfigureArgsForCall(i int) (*common.Envelope, uint64) {
fake.configureMutex.RLock()
defer fake.configureMutex.RUnlock()
argsForCall := fake.configureArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *ChannelSupport) ConfigureReturns(result1 error) {
fake.configureMutex.Lock()
defer fake.configureMutex.Unlock()
fake.ConfigureStub = nil
fake.configureReturns = struct {
result1 error
}{result1}
}
func (fake *ChannelSupport) ConfigureReturnsOnCall(i int, result1 error) {
fake.configureMutex.Lock()
defer fake.configureMutex.Unlock()
fake.ConfigureStub = nil
if fake.configureReturnsOnCall == nil {
fake.configureReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.configureReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *ChannelSupport) Order(arg1 *common.Envelope, arg2 uint64) error {
fake.orderMutex.Lock()
ret, specificReturn := fake.orderReturnsOnCall[len(fake.orderArgsForCall)]
fake.orderArgsForCall = append(fake.orderArgsForCall, struct {
arg1 *common.Envelope
arg2 uint64
}{arg1, arg2})
fake.recordInvocation("Order", []interface{}{arg1, arg2})
fake.orderMutex.Unlock()
if fake.OrderStub != nil {
return fake.OrderStub(arg1, arg2)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.orderReturns
return fakeReturns.result1
}
func (fake *ChannelSupport) OrderCallCount() int {
fake.orderMutex.RLock()
defer fake.orderMutex.RUnlock()
return len(fake.orderArgsForCall)
}
func (fake *ChannelSupport) OrderCalls(stub func(*common.Envelope, uint64) error) {
fake.orderMutex.Lock()
defer fake.orderMutex.Unlock()
fake.OrderStub = stub
}
func (fake *ChannelSupport) OrderArgsForCall(i int) (*common.Envelope, uint64) {
fake.orderMutex.RLock()
defer fake.orderMutex.RUnlock()
argsForCall := fake.orderArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *ChannelSupport) OrderReturns(result1 error) {
fake.orderMutex.Lock()
defer fake.orderMutex.Unlock()
fake.OrderStub = nil
fake.orderReturns = struct {
result1 error
}{result1}
}
func (fake *ChannelSupport) OrderReturnsOnCall(i int, result1 error) {
fake.orderMutex.Lock()
defer fake.orderMutex.Unlock()
fake.OrderStub = nil
if fake.orderReturnsOnCall == nil {
fake.orderReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.orderReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *ChannelSupport) ProcessConfigMsg(arg1 *common.Envelope) (*common.Envelope, uint64, error) {
fake.processConfigMsgMutex.Lock()
ret, specificReturn := fake.processConfigMsgReturnsOnCall[len(fake.processConfigMsgArgsForCall)]
fake.processConfigMsgArgsForCall = append(fake.processConfigMsgArgsForCall, struct {
arg1 *common.Envelope
}{arg1})
fake.recordInvocation("ProcessConfigMsg", []interface{}{arg1})
fake.processConfigMsgMutex.Unlock()
if fake.ProcessConfigMsgStub != nil {
return fake.ProcessConfigMsgStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2, ret.result3
}
fakeReturns := fake.processConfigMsgReturns
return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}
func (fake *ChannelSupport) ProcessConfigMsgCallCount() int {
fake.processConfigMsgMutex.RLock()
defer fake.processConfigMsgMutex.RUnlock()
return len(fake.processConfigMsgArgsForCall)
}
func (fake *ChannelSupport) ProcessConfigMsgCalls(stub func(*common.Envelope) (*common.Envelope, uint64, error)) {
fake.processConfigMsgMutex.Lock()
defer fake.processConfigMsgMutex.Unlock()
fake.ProcessConfigMsgStub = stub
}
func (fake *ChannelSupport) ProcessConfigMsgArgsForCall(i int) *common.Envelope {
fake.processConfigMsgMutex.RLock()
defer fake.processConfigMsgMutex.RUnlock()
argsForCall := fake.processConfigMsgArgsForCall[i]
return argsForCall.arg1
}
func (fake *ChannelSupport) ProcessConfigMsgReturns(result1 *common.Envelope, result2 uint64, result3 error) {
fake.processConfigMsgMutex.Lock()
defer fake.processConfigMsgMutex.Unlock()
fake.ProcessConfigMsgStub = nil
fake.processConfigMsgReturns = struct {
result1 *common.Envelope
result2 uint64
result3 error
}{result1, result2, result3}
}
func (fake *ChannelSupport) ProcessConfigMsgReturnsOnCall(i int, result1 *common.Envelope, result2 uint64, result3 error) {
fake.processConfigMsgMutex.Lock()
defer fake.processConfigMsgMutex.Unlock()
fake.ProcessConfigMsgStub = nil
if fake.processConfigMsgReturnsOnCall == nil {
fake.processConfigMsgReturnsOnCall = make(map[int]struct {
result1 *common.Envelope
result2 uint64
result3 error
})
}
fake.processConfigMsgReturnsOnCall[i] = struct {
result1 *common.Envelope
result2 uint64
result3 error
}{result1, result2, result3}
}
func (fake *ChannelSupport) ProcessConfigUpdateMsg(arg1 *common.Envelope) (*common.Envelope, uint64, error) {
fake.processConfigUpdateMsgMutex.Lock()
ret, specificReturn := fake.processConfigUpdateMsgReturnsOnCall[len(fake.processConfigUpdateMsgArgsForCall)]
fake.processConfigUpdateMsgArgsForCall = append(fake.processConfigUpdateMsgArgsForCall, struct {
arg1 *common.Envelope
}{arg1})
fake.recordInvocation("ProcessConfigUpdateMsg", []interface{}{arg1})
fake.processConfigUpdateMsgMutex.Unlock()
if fake.ProcessConfigUpdateMsgStub != nil {
return fake.ProcessConfigUpdateMsgStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2, ret.result3
}
fakeReturns := fake.processConfigUpdateMsgReturns
return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}
func (fake *ChannelSupport) ProcessConfigUpdateMsgCallCount() int {
fake.processConfigUpdateMsgMutex.RLock()
defer fake.processConfigUpdateMsgMutex.RUnlock()
return len(fake.processConfigUpdateMsgArgsForCall)
}
func (fake *ChannelSupport) ProcessConfigUpdateMsgCalls(stub func(*common.Envelope) (*common.Envelope, uint64, error)) {
fake.processConfigUpdateMsgMutex.Lock()
defer fake.processConfigUpdateMsgMutex.Unlock()
fake.ProcessConfigUpdateMsgStub = stub
}
func (fake *ChannelSupport) ProcessConfigUpdateMsgArgsForCall(i int) *common.Envelope {
fake.processConfigUpdateMsgMutex.RLock()
defer fake.processConfigUpdateMsgMutex.RUnlock()
argsForCall := fake.processConfigUpdateMsgArgsForCall[i]
return argsForCall.arg1
}
func (fake *ChannelSupport) ProcessConfigUpdateMsgReturns(result1 *common.Envelope, result2 uint64, result3 error) {
fake.processConfigUpdateMsgMutex.Lock()
defer fake.processConfigUpdateMsgMutex.Unlock()
fake.ProcessConfigUpdateMsgStub = nil
fake.processConfigUpdateMsgReturns = struct {
result1 *common.Envelope
result2 uint64
result3 error
}{result1, result2, result3}
}
func (fake *ChannelSupport) ProcessConfigUpdateMsgReturnsOnCall(i int, result1 *common.Envelope, result2 uint64, result3 error) {
fake.processConfigUpdateMsgMutex.Lock()
defer fake.processConfigUpdateMsgMutex.Unlock()
fake.ProcessConfigUpdateMsgStub = nil
if fake.processConfigUpdateMsgReturnsOnCall == nil {
fake.processConfigUpdateMsgReturnsOnCall = make(map[int]struct {
result1 *common.Envelope
result2 uint64
result3 error
})
}
fake.processConfigUpdateMsgReturnsOnCall[i] = struct {
result1 *common.Envelope
result2 uint64
result3 error
}{result1, result2, result3}
}
func (fake *ChannelSupport) ProcessNormalMsg(arg1 *common.Envelope) (uint64, error) {
fake.processNormalMsgMutex.Lock()
ret, specificReturn := fake.processNormalMsgReturnsOnCall[len(fake.processNormalMsgArgsForCall)]
fake.processNormalMsgArgsForCall = append(fake.processNormalMsgArgsForCall, struct {
arg1 *common.Envelope
}{arg1})
fake.recordInvocation("ProcessNormalMsg", []interface{}{arg1})
fake.processNormalMsgMutex.Unlock()
if fake.ProcessNormalMsgStub != nil {
return fake.ProcessNormalMsgStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.processNormalMsgReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *ChannelSupport) ProcessNormalMsgCallCount() int {
fake.processNormalMsgMutex.RLock()
defer fake.processNormalMsgMutex.RUnlock()
return len(fake.processNormalMsgArgsForCall)
}
func (fake *ChannelSupport) ProcessNormalMsgCalls(stub func(*common.Envelope) (uint64, error)) {
fake.processNormalMsgMutex.Lock()
defer fake.processNormalMsgMutex.Unlock()
fake.ProcessNormalMsgStub = stub
}
func (fake *ChannelSupport) ProcessNormalMsgArgsForCall(i int) *common.Envelope {
fake.processNormalMsgMutex.RLock()
defer fake.processNormalMsgMutex.RUnlock()
argsForCall := fake.processNormalMsgArgsForCall[i]
return argsForCall.arg1
}
func (fake *ChannelSupport) ProcessNormalMsgReturns(result1 uint64, result2 error) {
fake.processNormalMsgMutex.Lock()
defer fake.processNormalMsgMutex.Unlock()
fake.ProcessNormalMsgStub = nil
fake.processNormalMsgReturns = struct {
result1 uint64
result2 error
}{result1, result2}
}
func (fake *ChannelSupport) ProcessNormalMsgReturnsOnCall(i int, result1 uint64, result2 error) {
fake.processNormalMsgMutex.Lock()
defer fake.processNormalMsgMutex.Unlock()
fake.ProcessNormalMsgStub = nil
if fake.processNormalMsgReturnsOnCall == nil {
fake.processNormalMsgReturnsOnCall = make(map[int]struct {
result1 uint64
result2 error
})
}
fake.processNormalMsgReturnsOnCall[i] = struct {
result1 uint64
result2 error
}{result1, result2}
}
func (fake *ChannelSupport) WaitReady() error {
fake.waitReadyMutex.Lock()
ret, specificReturn := fake.waitReadyReturnsOnCall[len(fake.waitReadyArgsForCall)]
fake.waitReadyArgsForCall = append(fake.waitReadyArgsForCall, struct {
}{})
fake.recordInvocation("WaitReady", []interface{}{})
fake.waitReadyMutex.Unlock()
if fake.WaitReadyStub != nil {
return fake.WaitReadyStub()
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.waitReadyReturns
return fakeReturns.result1
}
func (fake *ChannelSupport) WaitReadyCallCount() int {
fake.waitReadyMutex.RLock()
defer fake.waitReadyMutex.RUnlock()
return len(fake.waitReadyArgsForCall)
}
func (fake *ChannelSupport) WaitReadyCalls(stub func() error) {
fake.waitReadyMutex.Lock()
defer fake.waitReadyMutex.Unlock()
fake.WaitReadyStub = stub
}
func (fake *ChannelSupport) WaitReadyReturns(result1 error) {
fake.waitReadyMutex.Lock()
defer fake.waitReadyMutex.Unlock()
fake.WaitReadyStub = nil
fake.waitReadyReturns = struct {
result1 error
}{result1}
}
func (fake *ChannelSupport) WaitReadyReturnsOnCall(i int, result1 error) {
fake.waitReadyMutex.Lock()
defer fake.waitReadyMutex.Unlock()
fake.WaitReadyStub = nil
if fake.waitReadyReturnsOnCall == nil {
fake.waitReadyReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.waitReadyReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *ChannelSupport) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.classifyMsgMutex.RLock()
defer fake.classifyMsgMutex.RUnlock()
fake.configureMutex.RLock()
defer fake.configureMutex.RUnlock()
fake.orderMutex.RLock()
defer fake.orderMutex.RUnlock()
fake.processConfigMsgMutex.RLock()
defer fake.processConfigMsgMutex.RUnlock()
fake.processConfigUpdateMsgMutex.RLock()
defer fake.processConfigUpdateMsgMutex.RUnlock()
fake.processNormalMsgMutex.RLock()
defer fake.processNormalMsgMutex.RUnlock()
fake.waitReadyMutex.RLock()
defer fake.waitReadyMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *ChannelSupport) 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)
}
var _ broadcast.ChannelSupport = new(ChannelSupport)
1
https://gitee.com/mirrors/fabric.git
git@gitee.com:mirrors/fabric.git
mirrors
fabric
Hyperledger fabric
v1.4.12

搜索帮助

53164aa7 5694891 3bd8fe86 5694891