Documentation
¶
Overview ¶
Package daemon implements the store-and-forward inbox for service nodes. It handles message storage, delivery, deduplication, and quota management.
Index ¶
- type Inbox
- func (i *Inbox) ComputeStoreRoot() [32]byte
- func (i *Inbox) CreateStorageCommitment(epochID uint64) *servicenodevm.StorageCommitment
- func (i *Inbox) Delete(ctx context.Context, msgID ids.ID, accountID [32]byte) error
- func (i *Inbox) Fetch(ctx context.Context, accountID [32]byte, afterTimestamp time.Time, limit int) ([]*servicenodevm.StoredMessage, error)
- func (i *Inbox) FetchByID(ctx context.Context, msgID ids.ID) (*servicenodevm.StoredMessage, error)
- func (i *Inbox) GetMessageCount(accountID [32]byte) int
- func (i *Inbox) GetQuota(accountID [32]byte) (used, total uint64)
- func (i *Inbox) GetStats() *InboxStats
- func (i *Inbox) Load(ctx context.Context) error
- func (i *Inbox) MarkDelivered(ctx context.Context, msgID ids.ID) error
- func (i *Inbox) PruneExpired(ctx context.Context) (int, error)
- func (i *Inbox) Store(ctx context.Context, msg *servicenodevm.StoredMessage) error
- type InboxStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inbox ¶
type Inbox struct {
// contains filtered or unexported fields
}
Inbox manages message storage and retrieval for a service node
func (*Inbox) ComputeStoreRoot ¶
ComputeStoreRoot computes the Merkle root of stored messages
func (*Inbox) CreateStorageCommitment ¶
func (i *Inbox) CreateStorageCommitment(epochID uint64) *servicenodevm.StorageCommitment
CreateStorageCommitment creates a storage commitment for an epoch
func (*Inbox) Fetch ¶
func (i *Inbox) Fetch(ctx context.Context, accountID [32]byte, afterTimestamp time.Time, limit int) ([]*servicenodevm.StoredMessage, error)
Fetch retrieves messages for an account
func (*Inbox) FetchByID ¶
func (i *Inbox) FetchByID(ctx context.Context, msgID ids.ID) (*servicenodevm.StoredMessage, error)
FetchByID retrieves a specific message by ID
func (*Inbox) GetMessageCount ¶
GetMessageCount returns the number of messages for an account
func (*Inbox) MarkDelivered ¶
MarkDelivered marks a message as delivered
func (*Inbox) PruneExpired ¶
PruneExpired removes expired messages
func (*Inbox) Store ¶
func (i *Inbox) Store(ctx context.Context, msg *servicenodevm.StoredMessage) error
Store stores a message in the inbox
Click to show internal directories.
Click to hide internal directories.