Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ValidateDurabilityInput ¶
func ValidateDurabilityInput(input *DurabilityInput) error
func ValidateEvictInput ¶
func ValidateEvictInput(input *EvictInput) error
Types ¶
type AuthorizedDeletion ¶
type AuthorizedDeletion struct {
Content model.StorageContent
BucketName string
}
type Candidate ¶
type Candidate struct {
ContentID int64 `bun:"content_id"`
BucketID int64 `bun:"bucket_id"`
Size int64 `bun:"content_size"`
AccessedAt time.Time `bun:"cache_accessed_at"`
}
Candidate is one cached content payload, not one object version: residency is content-addressed, so several versions of identical bytes share a single eviction decision.
type DurabilityInput ¶
type DurabilityInput struct {
BucketID int64 `json:"bucket_id"`
Generation int64 `json:"generation"`
}
func ParseDurabilityInput ¶
func ParseDurabilityInput(task *model.Task) (DurabilityInput, error)
type EvictInput ¶
type EvictInput struct {
ContentID int64 `json:"content_id"`
Generation int64 `json:"generation"`
AccessedAt *time.Time `json:"accessed_at,omitempty"`
}
EvictInput identifies one cache generation. AccessedAt is present for an LRU authorization and omitted when remote durability directly authorizes removal.
func ParseEvictInput ¶
func ParseEvictInput(task *model.Task) (EvictInput, error)
Click to show internal directories.
Click to hide internal directories.