package
0.0.1-alpha
Repository: https://github.com/twitter/scoot.git
Documentation: pkg.go.dev

# README

GitDB

GitDB is an implementation of ScootDB (snapshot.DB) that stores local values in a git ODB.

Code Structure Overview

  • db.go structure definition, top-level entry point, concurrency control
  • backends.go ID definition and parsing; backend definition
  • create.go create Snapshots (locally)
  • checkout.go run git commands to checkout
  • local_data.go Snapshots stored locally
  • stream.go get Snapshots from an upstream git repo

Backends

GitDB uses different Backends to identify, upload and download Snapshots.

Exit Codes

GitDB defines a set of exit codes that are returned depending on various git related errors (see common/errors/exit_codes.go for definitive list)

Snapshot ID format

GitDB uses Snapshot IDs that encode the backend, kind and per-backend data, separated by '-':

  • -(-)+

E.g.:

  • local-gc-3cf4f8cf84976621c3ca9f19dff114842b4e5db7
    • backend: local
    • kind: GitCommitSnapshot *sha: 3cf4f8cf84976621c3ca9f19dff114842b4e5db7
  • stream-gc-sm-3cf4f8cf84976621c3ca9f19dff114842b4e5db7
    • backend: stream
    • kind: GitCommitSnapshot
    • stream name: source_master *sha: 3cf4f8cf84976621c3ca9f19dff114842b4e5db7
  • bs-fs-sm-530c6daad567a0765c10064e1c7fc4fa486a2638-d1f58ef31066244fc8590bfb6940b4060b1baab1
    • backend: Bundlestore
    • kind: FSSnapshot
    • stream name: source_master
    • bundle name: 530c6daad567a0765c10064e1c7fc4fa486a2638
    • sha: d1f58ef31066244fc8590bfb6940b4060b1baab1

# Functions

No description provided by the author
MakeDBFromRepo makes a gitdb.DB that uses dataRepo for data and tmp for temporary directories.
MakeDBNewRepo makes a gitDB that uses a new DB, populated by initer.
Module returns a module that supports typical GitDB usage.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BundlestoreConfig defines how to talk to Bundlestore AllowStreamUpdate controls whether bundlestore download failures can fall back on stream updates.
DB stores its data in a Git Repo.
No description provided by the author
A Stream is a sequence of GitCommitSnapshots that updates.
TagsConfig specifies how GitDB should store Snapshots as tags in another git repo.
TmpRepoIniter creates a new Repo in a temp dir.

# Interfaces

Interface for defining initialization that results in a valid repo.Repository.
Interface for defining update behavior for an underlying repo.Repository.

# Type aliases

No description provided by the author
SnapshotKind describes the kind of a Snapshot: is it an FSSnapshot or a GitCommitSnapshot kind instead of type because type is a keyword.