Documentation ¶
Index ¶
- type SubscriptionManager
- func (s *SubscriptionManager) AddSubscription(id gethrpc.ID, encryptedSubscription common.EncryptedParamsLogSubscription) error
- func (s *SubscriptionManager) FilterLogsForReceipt(receipt *types.Receipt, account *gethcommon.Address) ([]*types.Log, error)
- func (s *SubscriptionManager) GetSubscribedLogsForBatch(batch *core.Batch, receipts types.Receipts) (common.EncryptedSubscriptionLogs, error)
- func (s *SubscriptionManager) RemoveSubscription(id gethrpc.ID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SubscriptionManager ¶
type SubscriptionManager struct {
// contains filtered or unexported fields
}
SubscriptionManager manages the creation/deletion of subscriptions, and the filtering and encryption of logs for active subscriptions.
func NewSubscriptionManager ¶
func NewSubscriptionManager(rpcEncryptionManager *rpc.EncryptionManager, storage storage.Storage, chainID int64, logger gethlog.Logger) *SubscriptionManager
func (*SubscriptionManager) AddSubscription ¶
func (s *SubscriptionManager) AddSubscription(id gethrpc.ID, encryptedSubscription common.EncryptedParamsLogSubscription) error
AddSubscription adds a log subscription to the enclave under the given ID, provided the request is authenticated correctly. If there is an existing subscription with the given ID, it is overwritten.
func (*SubscriptionManager) FilterLogsForReceipt ¶
func (s *SubscriptionManager) FilterLogsForReceipt(receipt *types.Receipt, account *gethcommon.Address) ([]*types.Log, error)
FilterLogsForReceipt removes the logs that the sender of a transaction is not allowed to view
func (*SubscriptionManager) GetSubscribedLogsForBatch ¶
func (s *SubscriptionManager) GetSubscribedLogsForBatch(batch *core.Batch, receipts types.Receipts) (common.EncryptedSubscriptionLogs, error)
GetSubscribedLogsForBatch - Retrieves and encrypts the logs for the batch in live mode. The assumption is that this function is called synchronously after the batch is produced
func (*SubscriptionManager) RemoveSubscription ¶
func (s *SubscriptionManager) RemoveSubscription(id gethrpc.ID)
RemoveSubscription removes the log subscription with the given ID from the enclave. If there is no subscription with the given ID, nothing is deleted.