Documentation ¶
Index ¶
- type Conn
- func (m Conn) Close() error
- func (m Conn) ConnState() libp2pnetwork.ConnectionState
- func (m Conn) GetStreams() []libp2pnetwork.Stream
- func (m Conn) ID() string
- func (m Conn) IsClosed() bool
- func (m Conn) LocalMultiaddr() ma.Multiaddr
- func (m Conn) LocalPeer() peer.ID
- func (m Conn) LocalPrivateKey() crypto.PrivKey
- func (m Conn) NewStream(ctx context.Context) (libp2pnetwork.Stream, error)
- func (m Conn) RemoteMultiaddr() ma.Multiaddr
- func (m Conn) RemotePeer() peer.ID
- func (m Conn) RemotePublicKey() crypto.PubKey
- func (m Conn) Scope() libp2pnetwork.ConnScope
- func (m Conn) Stat() libp2pnetwork.ConnStats
- type IDService
- func (m IDService) Close() error
- func (m IDService) IdentifyConn(conn libp2pnetwork.Conn)
- func (m IDService) IdentifyWait(conn libp2pnetwork.Conn) <-chan struct{}
- func (m IDService) ObservedAddrsFor(local ma.Multiaddr) []ma.Multiaddr
- func (m IDService) OwnObservedAddrs() []ma.Multiaddr
- func (m IDService) Start()
- type MockConnectionIndex
- type Net
- func (m Net) Close() error
- func (m Net) ClosePeer(id peer.ID) error
- func (m Net) Connectedness(id peer.ID) libp2pnetwork.Connectedness
- func (m Net) Conns() []libp2pnetwork.Conn
- func (m Net) ConnsToPeer(p peer.ID) []libp2pnetwork.Conn
- func (m Net) DialPeer(ctx context.Context, id peer.ID) (libp2pnetwork.Conn, error)
- func (m Net) InterfaceListenAddresses() ([]ma.Multiaddr, error)
- func (m Net) Listen(multiaddr ...ma.Multiaddr) error
- func (m Net) ListenAddresses() []ma.Multiaddr
- func (m Net) LocalPeer() peer.ID
- func (m Net) NewStream(ctx context.Context, id peer.ID) (libp2pnetwork.Stream, error)
- func (m Net) Notify(notifiee libp2pnetwork.Notifiee)
- func (m Net) Peers() []peer.ID
- func (m Net) Peerstore() peerstore.Peerstore
- func (m Net) ResourceManager() libp2pnetwork.ResourceManager
- func (m Net) SetStreamHandler(handler libp2pnetwork.StreamHandler)
- func (m Net) StopNotify(notifiee libp2pnetwork.Notifiee)
- type NodeInfoIndex
- func (m NodeInfoIndex) NodeInfo(id peer.ID) *records.NodeInfo
- func (m NodeInfoIndex) Self() *records.NodeInfo
- func (m NodeInfoIndex) SelfSealed(sender, recipient peer.ID, permissioned bool, ...) ([]byte, error)
- func (m NodeInfoIndex) SetNodeInfo(id peer.ID, node *records.NodeInfo)
- func (m NodeInfoIndex) UpdateSelfRecord(newInfo *records.NodeInfo)
- type NodeStorage
- func (m NodeStorage) Begin() basedb.Txn
- func (m NodeStorage) BeginRead() basedb.ReadTxn
- func (m NodeStorage) BumpNonce(txn basedb.ReadWriter, owner common.Address) error
- func (m NodeStorage) DeleteConfig(rw basedb.ReadWriter) error
- func (m NodeStorage) DeleteOperatorData(txn basedb.ReadWriter, id spectypes.OperatorID) error
- func (m NodeStorage) DeleteRecipientData(txn basedb.ReadWriter, owner common.Address) error
- func (m NodeStorage) DropOperators() error
- func (m NodeStorage) DropRecipients() error
- func (m NodeStorage) DropRegistryData() error
- func (m NodeStorage) DropShares() error
- func (m NodeStorage) GetConfig(rw basedb.ReadWriter) (*storage.ConfigLock, bool, error)
- func (m NodeStorage) GetLastProcessedBlock(txn basedb.Reader) (*big.Int, bool, error)
- func (m NodeStorage) GetNextNonce(txn basedb.Reader, owner common.Address) (registrystorage.Nonce, error)
- func (m NodeStorage) GetOperatorData(txn basedb.Reader, id spectypes.OperatorID) (*registrystorage.OperatorData, bool, error)
- func (m NodeStorage) GetOperatorDataByPubKey(txn basedb.Reader, operatorPublicKeyPEM []byte) (*registrystorage.OperatorData, bool, error)
- func (m NodeStorage) GetOperatorsPrefix() []byte
- func (m NodeStorage) GetPrivateKeyHash() (string, bool, error)
- func (m NodeStorage) GetRecipientData(txn basedb.Reader, owner common.Address) (*registrystorage.RecipientData, bool, error)
- func (m NodeStorage) GetRecipientDataMany(txn basedb.Reader, owners []common.Address) (map[common.Address]bellatrix.ExecutionAddress, error)
- func (m NodeStorage) GetRecipientsPrefix() []byte
- func (m NodeStorage) ListOperators(txn basedb.Reader, from uint64, to uint64) ([]registrystorage.OperatorData, error)
- func (m NodeStorage) OperatorsExist(r basedb.Reader, ids []spectypes.OperatorID) (bool, error)
- func (m NodeStorage) SaveConfig(rw basedb.ReadWriter, config *storage.ConfigLock) error
- func (m NodeStorage) SaveLastProcessedBlock(txn basedb.ReadWriter, offset *big.Int) error
- func (m NodeStorage) SaveOperatorData(txn basedb.ReadWriter, operatorData *registrystorage.OperatorData) (bool, error)
- func (m NodeStorage) SavePrivateKeyHash(privKeyHash string) error
- func (m NodeStorage) SaveRecipientData(txn basedb.ReadWriter, recipientData *registrystorage.RecipientData) (*registrystorage.RecipientData, error)
- func (m NodeStorage) Shares() registrystorage.Shares
- type Peerstore
- func (p Peerstore) AddAddr(pid peer.ID, addr ma.Multiaddr, ttl time.Duration)
- func (p Peerstore) AddAddrs(pid peer.ID, addrs []ma.Multiaddr, ttl time.Duration)
- func (p Peerstore) AddPrivKey(id peer.ID, key crypto.PrivKey) error
- func (p Peerstore) AddProtocols(id peer.ID, s ...libp2p_protocol.ID) error
- func (p Peerstore) AddPubKey(id peer.ID, key crypto.PubKey) error
- func (p Peerstore) AddrStream(ctx context.Context, id peer.ID) <-chan ma.Multiaddr
- func (p Peerstore) Addrs(pid peer.ID) []ma.Multiaddr
- func (p Peerstore) ClearAddrs(pid peer.ID)
- func (p Peerstore) Close() error
- func (p Peerstore) FirstSupportedProtocol(id peer.ID, s ...libp2p_protocol.ID) (libp2p_protocol.ID, error)
- func (p Peerstore) Get(pid peer.ID, key string) (interface{}, error)
- func (p Peerstore) GetProtocols(id peer.ID) ([]libp2p_protocol.ID, error)
- func (p Peerstore) LatencyEWMA(id peer.ID) time.Duration
- func (p Peerstore) PeerInfo(id peer.ID) peer.AddrInfo
- func (p Peerstore) Peers() peer.IDSlice
- func (p Peerstore) PeersWithAddrs() peer.IDSlice
- func (p Peerstore) PeersWithKeys() peer.IDSlice
- func (p Peerstore) PrivKey(id peer.ID) crypto.PrivKey
- func (p Peerstore) PubKey(id peer.ID) crypto.PubKey
- func (p Peerstore) Put(pid peer.ID, key string, val interface{}) error
- func (p Peerstore) RecordLatency(id peer.ID, duration time.Duration)
- func (p Peerstore) RemovePeer(id peer.ID)
- func (p Peerstore) RemoveProtocols(id peer.ID, s ...libp2p_protocol.ID) error
- func (p Peerstore) SetAddr(pid peer.ID, addr ma.Multiaddr, ttl time.Duration)
- func (p Peerstore) SetAddrs(pid peer.ID, addrs []ma.Multiaddr, ttl time.Duration)
- func (p Peerstore) SetProtocols(id peer.ID, s ...libp2p_protocol.ID) error
- func (p Peerstore) SupportsProtocols(id peer.ID, s ...libp2p_protocol.ID) ([]libp2p_protocol.ID, error)
- func (p Peerstore) UpdateAddrs(pid peer.ID, oldTTL time.Duration, newTTL time.Duration)
- type StreamController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
func (Conn) ConnState ¶
func (m Conn) ConnState() libp2pnetwork.ConnectionState
func (Conn) GetStreams ¶
func (m Conn) GetStreams() []libp2pnetwork.Stream
func (Conn) LocalMultiaddr ¶
func (Conn) LocalPrivateKey ¶
func (Conn) RemoteMultiaddr ¶
func (Conn) RemotePeer ¶
func (Conn) RemotePublicKey ¶
func (Conn) Scope ¶
func (m Conn) Scope() libp2pnetwork.ConnScope
func (Conn) Stat ¶
func (m Conn) Stat() libp2pnetwork.ConnStats
type IDService ¶
type IDService struct {
MockIdentifyWait chan struct{}
}
func (IDService) IdentifyConn ¶
func (m IDService) IdentifyConn(conn libp2pnetwork.Conn)
func (IDService) IdentifyWait ¶
func (m IDService) IdentifyWait(conn libp2pnetwork.Conn) <-chan struct{}
func (IDService) ObservedAddrsFor ¶
func (IDService) OwnObservedAddrs ¶
type MockConnectionIndex ¶
type MockConnectionIndex struct {
LimitValue bool
}
MockConnectionIndex is a mock implementation of the ConnectionIndex interface
func (*MockConnectionIndex) AtLimit ¶ added in v1.2.2
func (m *MockConnectionIndex) AtLimit(dir network.Direction) bool
AtLimit returns the mock value for Limit
func (*MockConnectionIndex) CanConnect ¶
func (m *MockConnectionIndex) CanConnect(id peer.ID) bool
CanConnect panics if called
func (*MockConnectionIndex) Connectedness ¶
func (m *MockConnectionIndex) Connectedness(id peer.ID) network.Connectedness
Connectedness panics if called
type Net ¶
func (Net) Connectedness ¶
func (m Net) Connectedness(id peer.ID) libp2pnetwork.Connectedness
func (Net) Conns ¶
func (m Net) Conns() []libp2pnetwork.Conn
func (Net) ConnsToPeer ¶
func (m Net) ConnsToPeer(p peer.ID) []libp2pnetwork.Conn
func (Net) InterfaceListenAddresses ¶
func (Net) ListenAddresses ¶
func (Net) Notify ¶
func (m Net) Notify(notifiee libp2pnetwork.Notifiee)
func (Net) ResourceManager ¶
func (m Net) ResourceManager() libp2pnetwork.ResourceManager
func (Net) SetStreamHandler ¶
func (m Net) SetStreamHandler(handler libp2pnetwork.StreamHandler)
func (Net) StopNotify ¶
func (m Net) StopNotify(notifiee libp2pnetwork.Notifiee)
type NodeInfoIndex ¶
func (NodeInfoIndex) Self ¶
func (m NodeInfoIndex) Self() *records.NodeInfo
func (NodeInfoIndex) SelfSealed ¶
func (m NodeInfoIndex) SelfSealed(sender, recipient peer.ID, permissioned bool, operatorSigner keys.OperatorSigner) ([]byte, error)
func (NodeInfoIndex) SetNodeInfo ¶
func (m NodeInfoIndex) SetNodeInfo(id peer.ID, node *records.NodeInfo)
func (NodeInfoIndex) UpdateSelfRecord ¶
func (m NodeInfoIndex) UpdateSelfRecord(newInfo *records.NodeInfo)
type NodeStorage ¶
func (NodeStorage) Begin ¶
func (m NodeStorage) Begin() basedb.Txn
func (NodeStorage) BeginRead ¶
func (m NodeStorage) BeginRead() basedb.ReadTxn
func (NodeStorage) BumpNonce ¶
func (m NodeStorage) BumpNonce(txn basedb.ReadWriter, owner common.Address) error
func (NodeStorage) DeleteConfig ¶
func (m NodeStorage) DeleteConfig(rw basedb.ReadWriter) error
func (NodeStorage) DeleteOperatorData ¶
func (m NodeStorage) DeleteOperatorData(txn basedb.ReadWriter, id spectypes.OperatorID) error
func (NodeStorage) DeleteRecipientData ¶
func (m NodeStorage) DeleteRecipientData(txn basedb.ReadWriter, owner common.Address) error
func (NodeStorage) DropOperators ¶
func (m NodeStorage) DropOperators() error
func (NodeStorage) DropRecipients ¶
func (m NodeStorage) DropRecipients() error
func (NodeStorage) DropRegistryData ¶
func (m NodeStorage) DropRegistryData() error
func (NodeStorage) DropShares ¶
func (m NodeStorage) DropShares() error
func (NodeStorage) GetConfig ¶
func (m NodeStorage) GetConfig(rw basedb.ReadWriter) (*storage.ConfigLock, bool, error)
func (NodeStorage) GetLastProcessedBlock ¶
func (NodeStorage) GetNextNonce ¶
func (m NodeStorage) GetNextNonce(txn basedb.Reader, owner common.Address) (registrystorage.Nonce, error)
func (NodeStorage) GetOperatorData ¶
func (m NodeStorage) GetOperatorData(txn basedb.Reader, id spectypes.OperatorID) (*registrystorage.OperatorData, bool, error)
func (NodeStorage) GetOperatorDataByPubKey ¶
func (m NodeStorage) GetOperatorDataByPubKey(txn basedb.Reader, operatorPublicKeyPEM []byte) (*registrystorage.OperatorData, bool, error)
func (NodeStorage) GetOperatorsPrefix ¶
func (m NodeStorage) GetOperatorsPrefix() []byte
func (NodeStorage) GetPrivateKeyHash ¶ added in v1.3.3
func (m NodeStorage) GetPrivateKeyHash() (string, bool, error)
func (NodeStorage) GetRecipientData ¶
func (m NodeStorage) GetRecipientData(txn basedb.Reader, owner common.Address) (*registrystorage.RecipientData, bool, error)
func (NodeStorage) GetRecipientDataMany ¶
func (m NodeStorage) GetRecipientDataMany(txn basedb.Reader, owners []common.Address) (map[common.Address]bellatrix.ExecutionAddress, error)
func (NodeStorage) GetRecipientsPrefix ¶
func (m NodeStorage) GetRecipientsPrefix() []byte
func (NodeStorage) ListOperators ¶
func (m NodeStorage) ListOperators(txn basedb.Reader, from uint64, to uint64) ([]registrystorage.OperatorData, error)
func (NodeStorage) OperatorsExist ¶
func (m NodeStorage) OperatorsExist(r basedb.Reader, ids []spectypes.OperatorID) (bool, error)
func (NodeStorage) SaveConfig ¶
func (m NodeStorage) SaveConfig(rw basedb.ReadWriter, config *storage.ConfigLock) error
func (NodeStorage) SaveLastProcessedBlock ¶
func (m NodeStorage) SaveLastProcessedBlock(txn basedb.ReadWriter, offset *big.Int) error
func (NodeStorage) SaveOperatorData ¶
func (m NodeStorage) SaveOperatorData(txn basedb.ReadWriter, operatorData *registrystorage.OperatorData) (bool, error)
func (NodeStorage) SavePrivateKeyHash ¶ added in v1.3.3
func (m NodeStorage) SavePrivateKeyHash(privKeyHash string) error
func (NodeStorage) SaveRecipientData ¶
func (m NodeStorage) SaveRecipientData(txn basedb.ReadWriter, recipientData *registrystorage.RecipientData) (*registrystorage.RecipientData, error)
func (NodeStorage) Shares ¶
func (m NodeStorage) Shares() registrystorage.Shares
type Peerstore ¶
type Peerstore struct { ExistingPIDs []peer.ID MockFirstSupportedProtocol libp2p_protocol.ID }
func (Peerstore) AddProtocols ¶
func (Peerstore) AddrStream ¶
func (Peerstore) ClearAddrs ¶
func (Peerstore) FirstSupportedProtocol ¶
func (p Peerstore) FirstSupportedProtocol(id peer.ID, s ...libp2p_protocol.ID) (libp2p_protocol.ID, error)
func (Peerstore) GetProtocols ¶
func (Peerstore) PeersWithAddrs ¶
func (Peerstore) PeersWithKeys ¶
func (Peerstore) RecordLatency ¶
func (Peerstore) RemovePeer ¶
func (Peerstore) RemoveProtocols ¶
func (Peerstore) SetProtocols ¶
func (Peerstore) SupportsProtocols ¶
func (p Peerstore) SupportsProtocols(id peer.ID, s ...libp2p_protocol.ID) ([]libp2p_protocol.ID, error)
type StreamController ¶
type StreamController struct {
MockRequest []byte
}
func (StreamController) HandleStream ¶
func (m StreamController) HandleStream(logger *zap.Logger, stream core.Stream) ([]byte, streams.StreamResponder, func(), error)
Click to show internal directories.
Click to hide internal directories.