Documentation ¶
Overview ¶
Package persist provides a persistence layer for the in-memory cache
Package persist provides a bootstrap for the in-memory cache ¶
Package persist provides a persistence layer for the in-memory cache ¶
Package persist provides a bootstrap for the in-memory cache ¶
Package persist provides a persistence layer for the in-memory cache
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // MaxSaveAge is the oldest allowable entry to persist MaxSaveAge = 30 * 24 * time.Hour // MaxLoadAge is the oldest allowable entry to load MaxLoadAge = 45 * 24 * time.Hour )
Functions ¶
func DefaultDiskPath ¶
Types ¶
type Cacher ¶
type Cacher interface { String() string Set(string, *Thing) error DeleteOlderThan(string, time.Time) error GetNewerThan(string, time.Time) *Thing Initialize() error Save() error }
Cacher is the cache interface we support
func NewCloudSQL ¶
NewCloudSQL returns a new Google Cloud SQL store (MySQL)
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
func (*Disk) DeleteOlderThan ¶
DeleteOlderThan deletes a thing older than a timestamp
func (*Disk) GetNewerThan ¶
GetNewerThan returns a thing older than a timestamp
func (*Disk) Initialize ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) DeleteOlderThan ¶
DeleteOlderThan deletes a thing older than a timestamp
func (*Memory) GetNewerThan ¶
GetNewerThan returns a thing older than a timestamp
func (*Memory) Initialize ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) DeleteOlderThan ¶
DeleteOlderThan deletes a thing older than a timestamp
func (*MySQL) GetNewerThan ¶
GetNewerThan returns a Item older than a timestamp
func (*MySQL) Initialize ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
NewPostgres returns a new Postgres cache
func (*Postgres) DeleteOlderThan ¶
DeleteOlderThan deletes a thing older than a timestamp
func (*Postgres) GetNewerThan ¶
GetNewerThan returns a Item older than a timestamp
func (*Postgres) Initialize ¶
type Thing ¶
type Thing struct { Created time.Time PullRequests []*github.PullRequest Issues []*github.Issue PullRequestComments []*github.PullRequestComment IssueComments []*github.IssueComment Timeline []*github.Timeline Reviews []*github.PullRequestReview StringBool map[string]bool }