fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery/mocks Index | Files

package mocks

import "github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery/mocks"

Index

Package Files

mockdiscoveryserver.go

type MockDiscoveryPeerEndpoint Uses

type MockDiscoveryPeerEndpoint struct {
    MSPID        string
    Endpoint     string
    LedgerHeight uint64
}

MockDiscoveryPeerEndpoint contains information about a Discover peer endpoint

type MockDiscoveryServer Uses

type MockDiscoveryServer struct {
    // contains filtered or unexported fields
}

MockDiscoveryServer is a mock Discovery server

func NewServer Uses

func NewServer(opts ...MockDiscoveryServerOpt) *MockDiscoveryServer

NewServer returns a new MockDiscoveryServer

func (*MockDiscoveryServer) Discover Uses

func (s *MockDiscoveryServer) Discover(ctx context.Context, request *discovery.SignedRequest) (*discovery.Response, error)

Discover Processes the given Discovery request and returns a mock response

type MockDiscoveryServerOpt Uses

type MockDiscoveryServerOpt func(s *MockDiscoveryServer)

MockDiscoveryServerOpt is an option for the MockDiscoveryServer

func WithLocalPeers Uses

func WithLocalPeers(peers ...*MockDiscoveryPeerEndpoint) MockDiscoveryServerOpt

WithLocalPeers adds a set of mock peers to the MockDiscoveryServer

func WithPeers Uses

func WithPeers(peers ...*MockDiscoveryPeerEndpoint) MockDiscoveryServerOpt

WithPeers adds a set of mock peers to the MockDiscoveryServer

Package mocks imports 6 packages (graph) and is imported by 1 packages. Updated 2019-08-29. Refresh now. Tools for package owners.