Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultArchiveAge is the default distance from head at which data is archived. DefaultArchiveAge uint64 = 100000 // DefaultArchivePeriod is how often the archive process runs. DefaultArchivePeriod = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
Archive manages an archive of data in an S3 compatible bucket.
func NewArchive ¶
NewArchive returns a new Archive backed by an S3 compatible bucket. The bucket must already exist.
type Config ¶
type Config struct { Endpoint string `toml:",omitempty"` // S3 compatible endpoint. Bucket string `toml:",omitempty"` // Bucket name. Must already exist. ID, Secret string `toml:",omitempty"` // Credentials. Age uint64 `toml:",omitempty"` // Optional. Distance from head before archiving. Period time.Duration `toml:",omitempty"` // Optional. How often to run the archive process. }
type DB ¶
type DB struct { *ethdb.LDBDatabase // contains filtered or unexported fields }
DB extends an LDBDatabase with support for archiving entries to a Archive.
Click to show internal directories.
Click to hide internal directories.