MCPcopy Index your code
hub / github.com/sourcegraph/checkup / Storage

Struct Storage

storage/sql/sql.go:30–49  ·  view source on GitHub ↗

Storage is a way to store checkup results in a SQL database.

Source from the content-addressed store, hash-verified

28
29// Storage is a way to store checkup results in a SQL database.
30type Storage struct {
31 // SqliteDBFile is the sqlite3 DB where check results will be stored.
32 SqliteDBFile string `json:"sqlite_db_file,omitempty"`
33
34 // PostgreSQL contains the Postgres connection settings.
35 PostgreSQL *struct {
36 Host string `json:"host,omitempty"`
37 Port int `json:"port,omitempty"`
38 User string `json:"user"`
39 Password string `json:"password,omitempty"`
40 DBName string `json:"dbname"`
41 SSLMode string `json:"sslmode,omitempty"`
42 } `json:"postgresql"`
43
44 // Check files older than CheckExpiry will be
45 // deleted on calls to Maintain(). If this is
46 // the zero value, no old check files will be
47 // deleted.
48 CheckExpiry time.Duration `json:"check_expiry,omitempty"`
49}
50
51// New creates a new Storage instance based on json config
52func New(config json.RawMessage) (Storage, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected