Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSnapshotNotFound = errors.New("snapshot not found")
Functions ¶
This section is empty.
Types ¶
type SnapshotCache ¶
type SnapshotCache struct {
// contains filtered or unexported fields
}
func NewSnapshotCache ¶
func NewSnapshotCache(db *sqlcdb.Client, redisClient redis.UniversalClient) *SnapshotCache
func (*SnapshotCache) Get ¶
func (c *SnapshotCache) Get(ctx context.Context, sandboxID string) (*SnapshotInfo, error)
Get returns the last snapshot for a sandbox, using cache with DB fallback.
func (*SnapshotCache) Invalidate ¶
func (c *SnapshotCache) Invalidate(ctx context.Context, sandboxID string)
Invalidate removes the cached snapshot for a sandbox.
type SnapshotInfo ¶
type SnapshotInfo struct {
Aliases []string `json:"aliases"`
Names []string `json:"names"`
Snapshot queries.Snapshot `json:"snapshot"`
EnvBuild queries.EnvBuild `json:"env_build"`
NotFound bool `json:"not_found,omitempty"`
}
SnapshotInfo holds cached snapshot with build and alias information.
Click to show internal directories.
Click to hide internal directories.