Documentation ¶
Overview ¶
Package custom implements specific ways to get/modify ct-log data on cheap cloud infrastructure.
Index ¶
- type Local
- func (l *Local) Begin() *LocalTx
- func (l *Local) GetSequenceByIdentityHash(treeID int64, hashes [][]byte) ([]int64, error)
- func (l *Local) GetSequenceByMerkleHash(treeID int64, hashes [][]byte) ([]int64, error)
- func (l *Local) GetSubtrees(treeID, treeRevision int64, ids []storage.NodeID) ([]*storagepb.SubtreeProto, error)
- func (l *Local) MostRecentRoot(treeID int64) (trillian.SignedLogRoot, frontier.Frontier, error)
- func (l *Local) QueueLeaves(treeID, queueTimestamp int64, leaves []*trillian.LogLeaf) error
- func (l *Local) Unsequenced(treeID int64) (int, error)
- type LocalTx
- func (ltx *LocalTx) Commit() error
- func (ltx *LocalTx) DequeueLeaves(treeID, seq, cutoffTime int64, limit int) ([]*trillian.LogLeaf, error)
- func (ltx *LocalTx) PutLeaves(treeID int64, seqs []int64, merkleHashes, idHashes [][]byte) error
- func (ltx *LocalTx) PutSubtrees(treeID, treeRevision int64, ids []storage.NodeID, ...) error
- func (ltx *LocalTx) StoreRoot(treeID int64, root trillian.SignedLogRoot, front frontier.Frontier) error
- type Remote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local implements convenience methods over a local database connection. The local database is for metadata and indices, because they're small and frequently accessed.
func (*Local) GetSequenceByIdentityHash ¶
GetSequenceByIdentityHash returns the sequence numbers for the leaves with the given identity hashes, in the tree with the given tree id. Missing sequence numbers are returned as -1.
func (*Local) GetSequenceByMerkleHash ¶
GetSequenceByMerkleHash returns the sequence numbers for the leaves with the given Merkle hashes, in the tree with the given tree id. Missing sequence numbers are returned as -1.
func (*Local) GetSubtrees ¶
func (l *Local) GetSubtrees(treeID, treeRevision int64, ids []storage.NodeID) ([]*storagepb.SubtreeProto, error)
GetSubtrees returns the most recent revision ( <= treeRevision ) of each subtree with a given id. Missing subtrees are silently elided.
func (*Local) MostRecentRoot ¶
MostRecentRoot returns most-recently committed root for the tree with the given treeID.
func (*Local) QueueLeaves ¶
type LocalTx ¶
type LocalTx struct {
// contains filtered or unexported fields
}
LocalTx implements convenience methods over a transaction with the local storage.
func (*LocalTx) DequeueLeaves ¶
func (*LocalTx) PutLeaves ¶
PutLeaves creates the index entries that let leaves be looked up by merkle/identity hash. It is assumed that seqs[i] corresponds to merkleHashes[i], corresponds to idHashes[i].
func (*LocalTx) PutSubtrees ¶
func (ltx *LocalTx) PutSubtrees(treeID, treeRevision int64, ids []storage.NodeID, subtrees []*storagepb.SubtreeProto) error
PutSubtrees serializes the subtrees and writes them to disk, indexed by their id. It is assumed that ids[i] corresponds to subtrees[i].
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
Remote implements convenience methods over a large-scale data host. The data is possibly hosted remotely, so may take a long time to fetch.
func NewRemote ¶
NewRemote returns a new remote database, where `acctId` and `appKey` are the Account ID and Application Key of a B2 bucket. `bucket` is the name of the bucket. `url` is the URL to use to download data.