// NewMockRPCServer creates a new mock instance
13727
func NewMockRPCServer(ctrl *gomock.Controller) *MockRPCServer {
	mock := &MockRPCServer{ctrl: ctrl}
	mock.recorder = &MockRPCServerMockRecorder{mock}
	return mock
}
600282
func NewMockNode() (*core.IpfsNode, error) {
	ctx := context.Background()

	// effectively offline, only peer in its network
	return core.NewNode(ctx, &core.BuildCfg{
		Online: true,
		Host:   MockHostOption(mocknet.New(ctx)),
	})
}
1232484
func NewMockServerManager(ctrl *gomock.Controller) *MockServerManager {
	mock := &MockServerManager{ctrl: ctrl}
	mock.recorder = &MockServerManagerMockRecorder{mock}
	return mock
}
91081
func NewMockPeer(name, url string, blockHeight uint64) *MockPeer {
	return &MockPeer{
		MockPeer:    fabmocks.NewMockPeer(name, url),
		blockHeight: blockHeight,
	}
}
1156169
func NewMockDeployment(ctrl *gomock.Controller) *MockDeployment {
	mock := &MockDeployment{ctrl: ctrl}
	mock.recorder = &MockDeploymentMockRecorder{mock}
	return mock
}
895102
func NewMockSDListener(ctrl *gomock.Controller) *MockSDListener {
	mock := &MockSDListener{ctrl: ctrl}
	mock.recorder = &MockSDListenerMockRecorder{mock}
	return mock
}
254225
func NewMockGerritServer(ctrl *gomock.Controller) *MockGerritServer {
	mock := &MockGerritServer{ctrl: ctrl}
	mock.recorder = &MockGerritServerMockRecorder{mock}
	return mock
}
1114937
func newMockClient(doer func(*http.Request) (*http.Response, error)) *http.Client {
	v := &http.Transport{
		Proxy: http.ProxyFromEnvironment,
		DialContext: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 30 * time.Second,
			DualStack: true,
		}).DialContext,
		MaxIdleConns:          100,
		IdleConnTimeout:       90 * time.Second,
		TLSHandshakeTimeout:   10 * time.Second,
		ExpectContinueTimeout: 1 * time.Second,
	}
	v.RegisterProtocol("http", transportFunc(doer))
	return &http.Client{
		Transport: http.RoundTripper(v),
	}
}
1164004
func NewMockStatsClient(ctrl *gomock.Controller) *MockStatsClient {
	mock := &MockStatsClient{ctrl: ctrl}
	mock.recorder = &MockStatsClientMockRecorder{mock}
	return mock
}
940032
func NewMockPitayaClient(ctrl *gomock.Controller) *MockPitayaClient {
	mock := &MockPitayaClient{ctrl: ctrl}
	mock.recorder = &MockPitayaClientMockRecorder{mock}
	return mock
}
873583
func NewMockSession(ctrl *gomock.Controller) *MockSession {
	mock := &MockSession{ctrl: ctrl}
	mock.recorder = &MockSessionMockRecorder{mock}
	return mock
}
166900
func NewMockCounter(ctrl *gomock.Controller) *MockCounter {
	mock := &MockCounter{ctrl: ctrl}
	mock.recorder = &MockCounterMockRecorder{mock}
	return mock
}
261671
func NewMockRbacV1Interface(ctrl *gomock.Controller) *MockRbacV1Interface {
	mock := &MockRbacV1Interface{ctrl: ctrl}
	mock.recorder = &MockRbacV1InterfaceMockRecorder{mock}
	return mock
}
1055903
func NewMockRCHTTPClienter(ctrl *gomock.Controller) *MockRCHTTPClienter {
	mock := &MockRCHTTPClienter{ctrl: ctrl}
	mock.recorder = &MockRCHTTPClienterMockRecorder{mock}
	return mock
}
627850
func (m *MockRPCClient) NewRPCClient(contextID, channel, rpcSecret string) error {
	ret := m.ctrl.Call(m, "NewRPCClient", contextID, channel, rpcSecret)
	ret0, _ := ret[0].(error)
	return ret0
}
833121
func NewMockBuildsClient(ctrl *gomock.Controller) *MockBuildsClient {
	mock := &MockBuildsClient{ctrl: ctrl}
	mock.recorder = &MockBuildsClientMockRecorder{mock}
	return mock
}
688956
func NewMockConn(localPk, remotePk *btcec.PublicKey,
	localAddr, remoteAddr net.Addr,
	bufferSize int) (*MockPeer, *MockPeer) {

	localPeer := &MockPeer{
		remotePub:    remotePk,
		remoteAddr:   remoteAddr,
		localPub:     localPk,
		localAddr:    localAddr,
		IncomingMsgs: make(chan []byte, bufferSize),
		OutgoingMsgs: make(chan []byte, bufferSize),
		Quit:         make(chan struct{}),
	}

	remotePeer := &MockPeer{
		remotePub:    localPk,
		remoteAddr:   localAddr,
		localPub:     remotePk,
		localAddr:    remoteAddr,
		IncomingMsgs: localPeer.OutgoingMsgs,
		OutgoingMsgs: localPeer.IncomingMsgs,
		Quit:         make(chan struct{}),
	}

	localPeer.RemoteQuit = remotePeer.Quit
	remotePeer.RemoteQuit = localPeer.Quit

	return localPeer, remotePeer
}