Documentation ¶
Index ¶
- type Store
- func (_m *Store) AddSubscribedStateURI(stateURI string) error
- func (_m *Store) DebugPrint()
- func (_m *Store) EncryptedTx(stateURI string, txID state.Version) (pb.GroupMessage, error)
- func (_m *Store) MarkTxSeenByPeer(deviceUniqueID string, stateURI string, txID state.Version) error
- func (_m *Store) MaxPeersPerSubscription() uint64
- func (_m *Store) OnNewSubscribedStateURI(handler func(string)) func()
- func (_m *Store) PruneTxSeenRecordsOlderThan(threshold time.Duration) error
- func (_m *Store) RemoveSubscribedStateURI(stateURI string) error
- func (_m *Store) SaveEncryptedTx(stateURI string, txID state.Version, etx pb.GroupMessage) error
- func (_m *Store) SetMaxPeersPerSubscription(max uint64) error
- func (_m *Store) SubscribedStateURIs() types.Set[string]
- func (_m *Store) TxSeenByPeer(deviceUniqueID string, stateURI string, txID state.Version) bool
- type TreePeerConn
- func (_m *TreePeerConn) Ack(stateURI string, txID state.Version) error
- func (_m *TreePeerConn) AddStateURI(stateURI string)
- func (_m *TreePeerConn) Addresses() types.Set[types.Address]
- func (_m *TreePeerConn) AnnounceP2PStateURI(ctx context.Context, stateURI string) error
- func (_m *TreePeerConn) Close() error
- func (_m *TreePeerConn) DeviceUniqueID() string
- func (_m *TreePeerConn) DialInfo() swarm.PeerDialInfo
- func (_m *TreePeerConn) Dialable() bool
- func (_m *TreePeerConn) Endpoint(dialInfo swarm.PeerDialInfo) (swarm.PeerEndpoint, bool)
- func (_m *TreePeerConn) Endpoints() map[swarm.PeerDialInfo]swarm.PeerEndpoint
- func (_m *TreePeerConn) EnsureConnected(ctx context.Context) error
- func (_m *TreePeerConn) Failures() uint64
- func (_m *TreePeerConn) LastContact() time.Time
- func (_m *TreePeerConn) LastFailure() time.Time
- func (_m *TreePeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)
- func (_m *TreePeerConn) Ready() bool
- func (_m *TreePeerConn) RemainingBackoff() time.Duration
- func (_m *TreePeerConn) RemoveStateURI(stateURI string)
- func (_m *TreePeerConn) SendPrivateTx(ctx context.Context, encryptedTx pb.GroupMessage) error
- func (_m *TreePeerConn) SendTx(ctx context.Context, tx treepb.Tx) error
- func (_m *TreePeerConn) SetDeviceUniqueID(id string)
- func (_m *TreePeerConn) StateURIs() types.Set[string]
- func (_m *TreePeerConn) Subscribe(ctx context.Context, stateURI string) (prototree.ReadableSubscription, error)
- func (_m *TreePeerConn) Transport() swarm.Transport
- func (_m *TreePeerConn) UpdateConnStats(success bool)
- type TreeProtocol
- func (_m *TreeProtocol) Autoclose()
- func (_m *TreeProtocol) AutocloseWithCleanup(closeFn func())
- func (_m *TreeProtocol) Close() error
- func (_m *TreeProtocol) Ctx() context.Context
- func (_m *TreeProtocol) Done() <-chan struct{}
- func (_m *TreeProtocol) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *TreeProtocol) InProcessSubscription(ctx context.Context, stateURI string, ...) (prototree.ReadableSubscription, error)
- func (_m *TreeProtocol) Name() string
- func (_m *TreeProtocol) NewChild(ctx context.Context, name string) *process.Process
- func (_m *TreeProtocol) ProcessTree() map[string]interface{}
- func (_m *TreeProtocol) ProvidersOfStateURI(ctx context.Context, stateURI string) <-chan prototree.TreePeerConn
- func (_m *TreeProtocol) SendTx(ctx context.Context, tx pb.Tx) error
- func (_m *TreeProtocol) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *TreeProtocol) Start() error
- func (_m *TreeProtocol) State() process.State
- func (_m *TreeProtocol) Subscribe(ctx context.Context, stateURI string) error
- func (_m *TreeProtocol) SubscribeStateURIs() (prototree.StateURISubscription, error)
- func (_m *TreeProtocol) Unsubscribe(stateURI string) error
- type TreeTransport
- func (_m *TreeTransport) AnnounceStateURIs(ctx context.Context, stateURIs types.Set[string])
- func (_m *TreeTransport) Autoclose()
- func (_m *TreeTransport) AutocloseWithCleanup(closeFn func())
- func (_m *TreeTransport) Close() error
- func (_m *TreeTransport) Ctx() context.Context
- func (_m *TreeTransport) Done() <-chan struct{}
- func (_m *TreeTransport) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *TreeTransport) Name() string
- func (_m *TreeTransport) NewChild(ctx context.Context, name string) *process.Process
- func (_m *TreeTransport) NewPeerConn(ctx context.Context, dialAddr string) (swarm.PeerConn, error)
- func (_m *TreeTransport) OnAckReceived(handler prototree.AckReceivedCallback)
- func (_m *TreeTransport) OnP2PStateURIReceived(handler prototree.P2PStateURIReceivedCallback)
- func (_m *TreeTransport) OnPrivateTxReceived(handler prototree.PrivateTxReceivedCallback)
- func (_m *TreeTransport) OnTxReceived(handler prototree.TxReceivedCallback)
- func (_m *TreeTransport) OnWritableSubscriptionOpened(handler prototree.WritableSubscriptionOpenedCallback)
- func (_m *TreeTransport) ProcessTree() map[string]interface{}
- func (_m *TreeTransport) ProvidersOfStateURI(ctx context.Context, stateURI string) (<-chan prototree.TreePeerConn, error)
- func (_m *TreeTransport) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *TreeTransport) Start() error
- func (_m *TreeTransport) State() process.State
- type WritableSubscriptionImpl
- func (_m *WritableSubscriptionImpl) Autoclose()
- func (_m *WritableSubscriptionImpl) AutocloseWithCleanup(closeFn func())
- func (_m *WritableSubscriptionImpl) Close() error
- func (_m *WritableSubscriptionImpl) Ctx() context.Context
- func (_m *WritableSubscriptionImpl) Done() <-chan struct{}
- func (_m *WritableSubscriptionImpl) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *WritableSubscriptionImpl) Name() string
- func (_m *WritableSubscriptionImpl) NewChild(ctx context.Context, name string) *process.Process
- func (_m *WritableSubscriptionImpl) ProcessTree() map[string]interface{}
- func (_m *WritableSubscriptionImpl) Put(ctx context.Context, msg prototree.SubscriptionMsg) error
- func (_m *WritableSubscriptionImpl) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *WritableSubscriptionImpl) Start() error
- func (_m *WritableSubscriptionImpl) State() process.State
- func (_m *WritableSubscriptionImpl) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store is an autogenerated mock type for the Store type
func NewStore ¶
func NewStore(t mockConstructorTestingTNewStore) *Store
NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Store) AddSubscribedStateURI ¶
AddSubscribedStateURI provides a mock function with given fields: stateURI
func (*Store) DebugPrint ¶
func (_m *Store) DebugPrint()
DebugPrint provides a mock function with given fields:
func (*Store) EncryptedTx ¶
EncryptedTx provides a mock function with given fields: stateURI, txID
func (*Store) MarkTxSeenByPeer ¶
MarkTxSeenByPeer provides a mock function with given fields: deviceUniqueID, stateURI, txID
func (*Store) MaxPeersPerSubscription ¶
MaxPeersPerSubscription provides a mock function with given fields:
func (*Store) OnNewSubscribedStateURI ¶
OnNewSubscribedStateURI provides a mock function with given fields: handler
func (*Store) PruneTxSeenRecordsOlderThan ¶
PruneTxSeenRecordsOlderThan provides a mock function with given fields: threshold
func (*Store) RemoveSubscribedStateURI ¶
RemoveSubscribedStateURI provides a mock function with given fields: stateURI
func (*Store) SaveEncryptedTx ¶
SaveEncryptedTx provides a mock function with given fields: stateURI, txID, etx
func (*Store) SetMaxPeersPerSubscription ¶
SetMaxPeersPerSubscription provides a mock function with given fields: max
func (*Store) SubscribedStateURIs ¶
SubscribedStateURIs provides a mock function with given fields:
type TreePeerConn ¶
TreePeerConn is an autogenerated mock type for the TreePeerConn type
func NewTreePeerConn ¶
func NewTreePeerConn(t mockConstructorTestingTNewTreePeerConn) *TreePeerConn
NewTreePeerConn creates a new instance of TreePeerConn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*TreePeerConn) Ack ¶
func (_m *TreePeerConn) Ack(stateURI string, txID state.Version) error
Ack provides a mock function with given fields: stateURI, txID
func (*TreePeerConn) AddStateURI ¶
func (_m *TreePeerConn) AddStateURI(stateURI string)
AddStateURI provides a mock function with given fields: stateURI
func (*TreePeerConn) Addresses ¶
func (_m *TreePeerConn) Addresses() types.Set[types.Address]
Addresses provides a mock function with given fields:
func (*TreePeerConn) AnnounceP2PStateURI ¶
func (_m *TreePeerConn) AnnounceP2PStateURI(ctx context.Context, stateURI string) error
AnnounceP2PStateURI provides a mock function with given fields: ctx, stateURI
func (*TreePeerConn) Close ¶
func (_m *TreePeerConn) Close() error
Close provides a mock function with given fields:
func (*TreePeerConn) DeviceUniqueID ¶
func (_m *TreePeerConn) DeviceUniqueID() string
DeviceUniqueID provides a mock function with given fields:
func (*TreePeerConn) DialInfo ¶
func (_m *TreePeerConn) DialInfo() swarm.PeerDialInfo
DialInfo provides a mock function with given fields:
func (*TreePeerConn) Dialable ¶
func (_m *TreePeerConn) Dialable() bool
Dialable provides a mock function with given fields:
func (*TreePeerConn) Endpoint ¶
func (_m *TreePeerConn) Endpoint(dialInfo swarm.PeerDialInfo) (swarm.PeerEndpoint, bool)
Endpoint provides a mock function with given fields: dialInfo
func (*TreePeerConn) Endpoints ¶
func (_m *TreePeerConn) Endpoints() map[swarm.PeerDialInfo]swarm.PeerEndpoint
Endpoints provides a mock function with given fields:
func (*TreePeerConn) EnsureConnected ¶
func (_m *TreePeerConn) EnsureConnected(ctx context.Context) error
EnsureConnected provides a mock function with given fields: ctx
func (*TreePeerConn) Failures ¶
func (_m *TreePeerConn) Failures() uint64
Failures provides a mock function with given fields:
func (*TreePeerConn) LastContact ¶
func (_m *TreePeerConn) LastContact() time.Time
LastContact provides a mock function with given fields:
func (*TreePeerConn) LastFailure ¶
func (_m *TreePeerConn) LastFailure() time.Time
LastFailure provides a mock function with given fields:
func (*TreePeerConn) PublicKeys ¶
func (_m *TreePeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)
PublicKeys provides a mock function with given fields: addr
func (*TreePeerConn) Ready ¶
func (_m *TreePeerConn) Ready() bool
Ready provides a mock function with given fields:
func (*TreePeerConn) RemainingBackoff ¶
func (_m *TreePeerConn) RemainingBackoff() time.Duration
RemainingBackoff provides a mock function with given fields:
func (*TreePeerConn) RemoveStateURI ¶
func (_m *TreePeerConn) RemoveStateURI(stateURI string)
RemoveStateURI provides a mock function with given fields: stateURI
func (*TreePeerConn) SendPrivateTx ¶
func (_m *TreePeerConn) SendPrivateTx(ctx context.Context, encryptedTx pb.GroupMessage) error
SendPrivateTx provides a mock function with given fields: ctx, encryptedTx
func (*TreePeerConn) SetDeviceUniqueID ¶
func (_m *TreePeerConn) SetDeviceUniqueID(id string)
SetDeviceUniqueID provides a mock function with given fields: id
func (*TreePeerConn) StateURIs ¶
func (_m *TreePeerConn) StateURIs() types.Set[string]
StateURIs provides a mock function with given fields:
func (*TreePeerConn) Subscribe ¶
func (_m *TreePeerConn) Subscribe(ctx context.Context, stateURI string) (prototree.ReadableSubscription, error)
Subscribe provides a mock function with given fields: ctx, stateURI
func (*TreePeerConn) Transport ¶
func (_m *TreePeerConn) Transport() swarm.Transport
Transport provides a mock function with given fields:
func (*TreePeerConn) UpdateConnStats ¶
func (_m *TreePeerConn) UpdateConnStats(success bool)
UpdateConnStats provides a mock function with given fields: success
type TreeProtocol ¶
TreeProtocol is an autogenerated mock type for the TreeProtocol type
func NewTreeProtocol ¶
func NewTreeProtocol(t mockConstructorTestingTNewTreeProtocol) *TreeProtocol
NewTreeProtocol creates a new instance of TreeProtocol. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*TreeProtocol) Autoclose ¶
func (_m *TreeProtocol) Autoclose()
Autoclose provides a mock function with given fields:
func (*TreeProtocol) AutocloseWithCleanup ¶
func (_m *TreeProtocol) AutocloseWithCleanup(closeFn func())
AutocloseWithCleanup provides a mock function with given fields: closeFn
func (*TreeProtocol) Close ¶
func (_m *TreeProtocol) Close() error
Close provides a mock function with given fields:
func (*TreeProtocol) Ctx ¶
func (_m *TreeProtocol) Ctx() context.Context
Ctx provides a mock function with given fields:
func (*TreeProtocol) Done ¶
func (_m *TreeProtocol) Done() <-chan struct{}
Done provides a mock function with given fields:
func (*TreeProtocol) Go ¶
func (_m *TreeProtocol) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
Go provides a mock function with given fields: ctx, name, fn
func (*TreeProtocol) InProcessSubscription ¶
func (_m *TreeProtocol) InProcessSubscription(ctx context.Context, stateURI string, subscriptionType prototree.SubscriptionType, keypath state.Keypath, fetchHistoryOpts *prototree.FetchHistoryOpts) (prototree.ReadableSubscription, error)
InProcessSubscription provides a mock function with given fields: ctx, stateURI, subscriptionType, keypath, fetchHistoryOpts
func (*TreeProtocol) Name ¶
func (_m *TreeProtocol) Name() string
Name provides a mock function with given fields:
func (*TreeProtocol) ProcessTree ¶
func (_m *TreeProtocol) ProcessTree() map[string]interface{}
ProcessTree provides a mock function with given fields:
func (*TreeProtocol) ProvidersOfStateURI ¶
func (_m *TreeProtocol) ProvidersOfStateURI(ctx context.Context, stateURI string) <-chan prototree.TreePeerConn
ProvidersOfStateURI provides a mock function with given fields: ctx, stateURI
func (*TreeProtocol) SpawnChild ¶
SpawnChild provides a mock function with given fields: ctx, child
func (*TreeProtocol) Start ¶
func (_m *TreeProtocol) Start() error
Start provides a mock function with given fields:
func (*TreeProtocol) State ¶
func (_m *TreeProtocol) State() process.State
State provides a mock function with given fields:
func (*TreeProtocol) Subscribe ¶
func (_m *TreeProtocol) Subscribe(ctx context.Context, stateURI string) error
Subscribe provides a mock function with given fields: ctx, stateURI
func (*TreeProtocol) SubscribeStateURIs ¶
func (_m *TreeProtocol) SubscribeStateURIs() (prototree.StateURISubscription, error)
SubscribeStateURIs provides a mock function with given fields:
func (*TreeProtocol) Unsubscribe ¶
func (_m *TreeProtocol) Unsubscribe(stateURI string) error
Unsubscribe provides a mock function with given fields: stateURI
type TreeTransport ¶
TreeTransport is an autogenerated mock type for the TreeTransport type
func NewTreeTransport ¶
func NewTreeTransport(t mockConstructorTestingTNewTreeTransport) *TreeTransport
NewTreeTransport creates a new instance of TreeTransport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*TreeTransport) AnnounceStateURIs ¶
AnnounceStateURIs provides a mock function with given fields: ctx, stateURIs
func (*TreeTransport) Autoclose ¶
func (_m *TreeTransport) Autoclose()
Autoclose provides a mock function with given fields:
func (*TreeTransport) AutocloseWithCleanup ¶
func (_m *TreeTransport) AutocloseWithCleanup(closeFn func())
AutocloseWithCleanup provides a mock function with given fields: closeFn
func (*TreeTransport) Close ¶
func (_m *TreeTransport) Close() error
Close provides a mock function with given fields:
func (*TreeTransport) Ctx ¶
func (_m *TreeTransport) Ctx() context.Context
Ctx provides a mock function with given fields:
func (*TreeTransport) Done ¶
func (_m *TreeTransport) Done() <-chan struct{}
Done provides a mock function with given fields:
func (*TreeTransport) Go ¶
func (_m *TreeTransport) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
Go provides a mock function with given fields: ctx, name, fn
func (*TreeTransport) Name ¶
func (_m *TreeTransport) Name() string
Name provides a mock function with given fields:
func (*TreeTransport) NewPeerConn ¶
NewPeerConn provides a mock function with given fields: ctx, dialAddr
func (*TreeTransport) OnAckReceived ¶
func (_m *TreeTransport) OnAckReceived(handler prototree.AckReceivedCallback)
OnAckReceived provides a mock function with given fields: handler
func (*TreeTransport) OnP2PStateURIReceived ¶
func (_m *TreeTransport) OnP2PStateURIReceived(handler prototree.P2PStateURIReceivedCallback)
OnP2PStateURIReceived provides a mock function with given fields: handler
func (*TreeTransport) OnPrivateTxReceived ¶
func (_m *TreeTransport) OnPrivateTxReceived(handler prototree.PrivateTxReceivedCallback)
OnPrivateTxReceived provides a mock function with given fields: handler
func (*TreeTransport) OnTxReceived ¶
func (_m *TreeTransport) OnTxReceived(handler prototree.TxReceivedCallback)
OnTxReceived provides a mock function with given fields: handler
func (*TreeTransport) OnWritableSubscriptionOpened ¶
func (_m *TreeTransport) OnWritableSubscriptionOpened(handler prototree.WritableSubscriptionOpenedCallback)
OnWritableSubscriptionOpened provides a mock function with given fields: handler
func (*TreeTransport) ProcessTree ¶
func (_m *TreeTransport) ProcessTree() map[string]interface{}
ProcessTree provides a mock function with given fields:
func (*TreeTransport) ProvidersOfStateURI ¶
func (_m *TreeTransport) ProvidersOfStateURI(ctx context.Context, stateURI string) (<-chan prototree.TreePeerConn, error)
ProvidersOfStateURI provides a mock function with given fields: ctx, stateURI
func (*TreeTransport) SpawnChild ¶
SpawnChild provides a mock function with given fields: ctx, child
func (*TreeTransport) Start ¶
func (_m *TreeTransport) Start() error
Start provides a mock function with given fields:
func (*TreeTransport) State ¶
func (_m *TreeTransport) State() process.State
State provides a mock function with given fields:
type WritableSubscriptionImpl ¶
WritableSubscriptionImpl is an autogenerated mock type for the WritableSubscriptionImpl type
func NewWritableSubscriptionImpl ¶
func NewWritableSubscriptionImpl(t mockConstructorTestingTNewWritableSubscriptionImpl) *WritableSubscriptionImpl
NewWritableSubscriptionImpl creates a new instance of WritableSubscriptionImpl. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*WritableSubscriptionImpl) Autoclose ¶
func (_m *WritableSubscriptionImpl) Autoclose()
Autoclose provides a mock function with given fields:
func (*WritableSubscriptionImpl) AutocloseWithCleanup ¶
func (_m *WritableSubscriptionImpl) AutocloseWithCleanup(closeFn func())
AutocloseWithCleanup provides a mock function with given fields: closeFn
func (*WritableSubscriptionImpl) Close ¶
func (_m *WritableSubscriptionImpl) Close() error
Close provides a mock function with given fields:
func (*WritableSubscriptionImpl) Ctx ¶
func (_m *WritableSubscriptionImpl) Ctx() context.Context
Ctx provides a mock function with given fields:
func (*WritableSubscriptionImpl) Done ¶
func (_m *WritableSubscriptionImpl) Done() <-chan struct{}
Done provides a mock function with given fields:
func (*WritableSubscriptionImpl) Go ¶
func (_m *WritableSubscriptionImpl) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
Go provides a mock function with given fields: ctx, name, fn
func (*WritableSubscriptionImpl) Name ¶
func (_m *WritableSubscriptionImpl) Name() string
Name provides a mock function with given fields:
func (*WritableSubscriptionImpl) NewChild ¶
NewChild provides a mock function with given fields: ctx, name
func (*WritableSubscriptionImpl) ProcessTree ¶
func (_m *WritableSubscriptionImpl) ProcessTree() map[string]interface{}
ProcessTree provides a mock function with given fields:
func (*WritableSubscriptionImpl) Put ¶
func (_m *WritableSubscriptionImpl) Put(ctx context.Context, msg prototree.SubscriptionMsg) error
Put provides a mock function with given fields: ctx, msg
func (*WritableSubscriptionImpl) SpawnChild ¶
SpawnChild provides a mock function with given fields: ctx, child
func (*WritableSubscriptionImpl) Start ¶
func (_m *WritableSubscriptionImpl) Start() error
Start provides a mock function with given fields:
func (*WritableSubscriptionImpl) State ¶
func (_m *WritableSubscriptionImpl) State() process.State
State provides a mock function with given fields:
func (*WritableSubscriptionImpl) String ¶
func (_m *WritableSubscriptionImpl) String() string
String provides a mock function with given fields: