atxsync

package
v1.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(db sql.Executor) error

func GetRequest

func GetRequest(db sql.Executor, epoch types.EpochID) (time.Time, int64, int64, error)

func SaveRequest

func SaveRequest(db sql.Executor, epoch types.EpochID, timestamp time.Time, total, downloaded int64) error

func SaveSyncState

func SaveSyncState(db sql.Executor, epoch types.EpochID, states EpochSyncState, max int) error

Types

type EpochSyncState added in v1.7.0

type EpochSyncState = map[types.ATXID]*IDSyncState

func GetSyncState

func GetSyncState(db sql.Executor, epoch types.EpochID) (EpochSyncState, error)

type IDSyncState added in v1.7.0

type IDSyncState struct {
	Tries int
	// contains filtered or unexported fields
}

IDSyncState tracks how many times we tried to sync an ATX.

func (*IDSyncState) TriesPersisted added in v1.7.0

func (s *IDSyncState) TriesPersisted() bool

TriesPersisted returns true if the number of tries is equal to the number of persisted tries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL