Documentation ¶
Index ¶
- type PeerConn
- func (_m *PeerConn) AddStateURI(stateURI string)
- func (_m *PeerConn) Addresses() types.Set[types.Address]
- func (_m *PeerConn) Close() error
- func (_m *PeerConn) DeviceUniqueID() string
- func (_m *PeerConn) DialInfo() swarm.PeerDialInfo
- func (_m *PeerConn) Dialable() bool
- func (_m *PeerConn) Endpoint(dialInfo swarm.PeerDialInfo) (swarm.PeerEndpoint, bool)
- func (_m *PeerConn) Endpoints() map[swarm.PeerDialInfo]swarm.PeerEndpoint
- func (_m *PeerConn) EnsureConnected(ctx context.Context) error
- func (_m *PeerConn) Failures() uint64
- func (_m *PeerConn) LastContact() time.Time
- func (_m *PeerConn) LastFailure() time.Time
- func (_m *PeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)
- func (_m *PeerConn) Ready() bool
- func (_m *PeerConn) RemainingBackoff() time.Duration
- func (_m *PeerConn) RemoveStateURI(stateURI string)
- func (_m *PeerConn) SetDeviceUniqueID(id string)
- func (_m *PeerConn) StateURIs() types.Set[string]
- func (_m *PeerConn) Transport() swarm.Transport
- func (_m *PeerConn) UpdateConnStats(success bool)
- type PeerStore
- func (_m *PeerStore) AddDialInfo(dialInfo swarm.PeerDialInfo, deviceUniqueID string) swarm.PeerEndpoint
- func (_m *PeerStore) AddVerifiedCredentials(dialInfo swarm.PeerDialInfo, deviceUniqueID string, address types.Address, ...) swarm.PeerEndpoint
- func (_m *PeerStore) AllDialInfos() map[swarm.PeerDialInfo]struct{}
- func (_m *PeerStore) Autoclose()
- func (_m *PeerStore) AutocloseWithCleanup(closeFn func())
- func (_m *PeerStore) Close() error
- func (_m *PeerStore) Ctx() context.Context
- func (_m *PeerStore) DebugPrint()
- func (_m *PeerStore) Done() <-chan struct{}
- func (_m *PeerStore) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *PeerStore) IsKnownPeer(dialInfo swarm.PeerDialInfo) bool
- func (_m *PeerStore) Name() string
- func (_m *PeerStore) NewChild(ctx context.Context, name string) *process.Process
- func (_m *PeerStore) OnNewUnverifiedPeer(fn func(swarm.PeerDialInfo))
- func (_m *PeerStore) OnNewVerifiedPeer(fn func(swarm.PeerDevice))
- func (_m *PeerStore) PeerEndpoint(dialInfo swarm.PeerDialInfo) swarm.PeerEndpoint
- func (_m *PeerStore) PeerWithDeviceUniqueID(deviceUniqueID string) (swarm.PeerDevice, bool)
- func (_m *PeerStore) Peers() []swarm.PeerDevice
- func (_m *PeerStore) PeersFromTransport(transportName string) []swarm.PeerEndpoint
- func (_m *PeerStore) PeersServingStateURI(stateURI string) []swarm.PeerDevice
- func (_m *PeerStore) PeersWithAddress(address types.Address) []swarm.PeerDevice
- func (_m *PeerStore) ProcessTree() map[string]interface{}
- func (_m *PeerStore) RemovePeers(deviceUniqueIDs []string) error
- func (_m *PeerStore) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *PeerStore) Start() error
- func (_m *PeerStore) State() process.State
- func (_m *PeerStore) UnverifiedPeers() []swarm.PeerDialInfo
- func (_m *PeerStore) VerifiedPeers() []swarm.PeerDevice
- type Protocol
- type Transport
- func (_m *Transport) Autoclose()
- func (_m *Transport) AutocloseWithCleanup(closeFn func())
- func (_m *Transport) Close() error
- func (_m *Transport) Ctx() context.Context
- func (_m *Transport) Done() <-chan struct{}
- func (_m *Transport) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *Transport) Name() string
- func (_m *Transport) NewChild(ctx context.Context, name string) *process.Process
- func (_m *Transport) NewPeerConn(ctx context.Context, dialAddr string) (swarm.PeerConn, error)
- func (_m *Transport) ProcessTree() map[string]interface{}
- func (_m *Transport) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *Transport) Start() error
- func (_m *Transport) State() process.State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerConn ¶
PeerConn is an autogenerated mock type for the PeerConn type
func NewPeerConn ¶
func NewPeerConn(t mockConstructorTestingTNewPeerConn) *PeerConn
NewPeerConn creates a new instance of PeerConn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*PeerConn) AddStateURI ¶
AddStateURI provides a mock function with given fields: stateURI
func (*PeerConn) DeviceUniqueID ¶
DeviceUniqueID provides a mock function with given fields:
func (*PeerConn) DialInfo ¶
func (_m *PeerConn) DialInfo() swarm.PeerDialInfo
DialInfo provides a mock function with given fields:
func (*PeerConn) Endpoint ¶
func (_m *PeerConn) Endpoint(dialInfo swarm.PeerDialInfo) (swarm.PeerEndpoint, bool)
Endpoint provides a mock function with given fields: dialInfo
func (*PeerConn) Endpoints ¶
func (_m *PeerConn) Endpoints() map[swarm.PeerDialInfo]swarm.PeerEndpoint
Endpoints provides a mock function with given fields:
func (*PeerConn) EnsureConnected ¶
EnsureConnected provides a mock function with given fields: ctx
func (*PeerConn) LastContact ¶
LastContact provides a mock function with given fields:
func (*PeerConn) LastFailure ¶
LastFailure provides a mock function with given fields:
func (*PeerConn) PublicKeys ¶
func (_m *PeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)
PublicKeys provides a mock function with given fields: addr
func (*PeerConn) RemainingBackoff ¶
RemainingBackoff provides a mock function with given fields:
func (*PeerConn) RemoveStateURI ¶
RemoveStateURI provides a mock function with given fields: stateURI
func (*PeerConn) SetDeviceUniqueID ¶
SetDeviceUniqueID provides a mock function with given fields: id
func (*PeerConn) UpdateConnStats ¶
UpdateConnStats provides a mock function with given fields: success
type PeerStore ¶
PeerStore is an autogenerated mock type for the PeerStore type
func NewPeerStore ¶
func NewPeerStore(t mockConstructorTestingTNewPeerStore) *PeerStore
NewPeerStore creates a new instance of PeerStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*PeerStore) AddDialInfo ¶
func (_m *PeerStore) AddDialInfo(dialInfo swarm.PeerDialInfo, deviceUniqueID string) swarm.PeerEndpoint
AddDialInfo provides a mock function with given fields: dialInfo, deviceUniqueID
func (*PeerStore) AddVerifiedCredentials ¶
func (_m *PeerStore) AddVerifiedCredentials(dialInfo swarm.PeerDialInfo, deviceUniqueID string, address types.Address, sigpubkey *crypto.SigningPublicKey, encpubkey *crypto.AsymEncPubkey) swarm.PeerEndpoint
AddVerifiedCredentials provides a mock function with given fields: dialInfo, deviceUniqueID, address, sigpubkey, encpubkey
func (*PeerStore) AllDialInfos ¶
func (_m *PeerStore) AllDialInfos() map[swarm.PeerDialInfo]struct{}
AllDialInfos provides a mock function with given fields:
func (*PeerStore) Autoclose ¶
func (_m *PeerStore) Autoclose()
Autoclose provides a mock function with given fields:
func (*PeerStore) AutocloseWithCleanup ¶
func (_m *PeerStore) AutocloseWithCleanup(closeFn func())
AutocloseWithCleanup provides a mock function with given fields: closeFn
func (*PeerStore) DebugPrint ¶
func (_m *PeerStore) DebugPrint()
DebugPrint provides a mock function with given fields:
func (*PeerStore) Done ¶
func (_m *PeerStore) Done() <-chan struct{}
Done provides a mock function with given fields:
func (*PeerStore) IsKnownPeer ¶
func (_m *PeerStore) IsKnownPeer(dialInfo swarm.PeerDialInfo) bool
IsKnownPeer provides a mock function with given fields: dialInfo
func (*PeerStore) OnNewUnverifiedPeer ¶
func (_m *PeerStore) OnNewUnverifiedPeer(fn func(swarm.PeerDialInfo))
OnNewUnverifiedPeer provides a mock function with given fields: fn
func (*PeerStore) OnNewVerifiedPeer ¶
func (_m *PeerStore) OnNewVerifiedPeer(fn func(swarm.PeerDevice))
OnNewVerifiedPeer provides a mock function with given fields: fn
func (*PeerStore) PeerEndpoint ¶
func (_m *PeerStore) PeerEndpoint(dialInfo swarm.PeerDialInfo) swarm.PeerEndpoint
PeerEndpoint provides a mock function with given fields: dialInfo
func (*PeerStore) PeerWithDeviceUniqueID ¶
func (_m *PeerStore) PeerWithDeviceUniqueID(deviceUniqueID string) (swarm.PeerDevice, bool)
PeerWithDeviceUniqueID provides a mock function with given fields: deviceUniqueID
func (*PeerStore) Peers ¶
func (_m *PeerStore) Peers() []swarm.PeerDevice
Peers provides a mock function with given fields:
func (*PeerStore) PeersFromTransport ¶
func (_m *PeerStore) PeersFromTransport(transportName string) []swarm.PeerEndpoint
PeersFromTransport provides a mock function with given fields: transportName
func (*PeerStore) PeersServingStateURI ¶
func (_m *PeerStore) PeersServingStateURI(stateURI string) []swarm.PeerDevice
PeersServingStateURI provides a mock function with given fields: stateURI
func (*PeerStore) PeersWithAddress ¶
func (_m *PeerStore) PeersWithAddress(address types.Address) []swarm.PeerDevice
PeersWithAddress provides a mock function with given fields: address
func (*PeerStore) ProcessTree ¶
ProcessTree provides a mock function with given fields:
func (*PeerStore) RemovePeers ¶
RemovePeers provides a mock function with given fields: deviceUniqueIDs
func (*PeerStore) SpawnChild ¶
SpawnChild provides a mock function with given fields: ctx, child
func (*PeerStore) UnverifiedPeers ¶
func (_m *PeerStore) UnverifiedPeers() []swarm.PeerDialInfo
UnverifiedPeers provides a mock function with given fields:
func (*PeerStore) VerifiedPeers ¶
func (_m *PeerStore) VerifiedPeers() []swarm.PeerDevice
VerifiedPeers provides a mock function with given fields:
type Protocol ¶
Protocol is an autogenerated mock type for the Protocol type
func (*Protocol) Close ¶
func (_m *Protocol) Close()
Close provides a mock function with given fields:
type Transport ¶
Transport is an autogenerated mock type for the Transport type
func NewTransport ¶
func NewTransport(t mockConstructorTestingTNewTransport) *Transport
NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Transport) Autoclose ¶
func (_m *Transport) Autoclose()
Autoclose provides a mock function with given fields:
func (*Transport) AutocloseWithCleanup ¶
func (_m *Transport) AutocloseWithCleanup(closeFn func())
AutocloseWithCleanup provides a mock function with given fields: closeFn
func (*Transport) Done ¶
func (_m *Transport) Done() <-chan struct{}
Done provides a mock function with given fields:
func (*Transport) NewPeerConn ¶
NewPeerConn provides a mock function with given fields: ctx, dialAddr
func (*Transport) ProcessTree ¶
ProcessTree provides a mock function with given fields:
func (*Transport) SpawnChild ¶
SpawnChild provides a mock function with given fields: ctx, child