go.bigb.es/curator

v1.4.2
Doc Versions Source

Types

T type Ops

src
type Ops struct {
	// contains filtered or unexported fields
}

Ops implements sumdb.ServerOps backed by database persistence. Records and hashes are read from the database on demand. A mutex serializes writes to ensure tlog consistency.

f func NewOps

src
func NewOps(host string, resolver store.ModuleResolver, creds store.CredentialResolver, gitc *git.Cache, db store.SumdbStore, signer string) *Ops

m func (*Ops) Lookup

src
func (s *Ops) Lookup(ctx context.Context, m module.Version) (int64, error)

Lookup looks up a record for the given module, creating it if needed.

m func (*Ops) ReadRecords

src
func (s *Ops) ReadRecords(ctx context.Context, id, n int64) ([][]byte, error)

ReadRecords returns the content for records id through id+n-1.

m func (*Ops) ReadTileData

src
func (s *Ops) ReadTileData(ctx context.Context, t tlog.Tile) ([]byte, error)

ReadTileData reads the content of tile t.

m func (*Ops) RecordCount

src
func (s *Ops) RecordCount() int64

RecordCount returns the current number of records (for metrics).

m func (*Ops) Signed

src
func (s *Ops) Signed(ctx context.Context) ([]byte, error)

Signed returns the signed hash of the latest tree.

Source Files