Documentation
¶
Overview ¶
Package cachefill maintains an opt-in, bounded local shelf of complete media sources. It fills sequentially at background priority and never writes watch history. The manifest and segment pins are node-local.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Household returns active members of the configured household scope.
Household func(context.Context, string) ([]core.User, error)
State WatchReader
Now func() time.Time
Catalog Catalog
Resolver core.Resolver
Engine Engine
Cache Cache
Owner func(context.Context) (*core.User, error)
Config func() config.Cache
Active func() bool
FreeBytes func() (int64, error)
Remember func(context.Context, *core.User, core.RatingKey, core.ClientCaps, *core.Resolution) error
Logger *slog.Logger
}
type Item ¶
type Item struct {
Key core.RatingKey `json:"key"`
Title string `json:"title"`
ReleaseID string `json:"releaseId"`
Size int64 `json:"size"`
Complete bool `json:"complete"`
Reason string `json:"reason,omitempty"`
Score float64 `json:"score,omitempty"`
StoredBytes int64 `json:"storedBytes"`
Updated time.Time `json:"updated"`
}
type SharedStore ¶
type SharedStore struct {
// contains filtered or unexported fields
}
SharedStore keeps the shelf in the server database and fences every manifest/pin mutation with a renewable epoch. A former worker cannot unpin a new worker's shelf after losing its lease. The NAS holds media bytes only.
func NewSharedStore ¶
func NewSharedStore(db *sql.DB, node string) *SharedStore
type Status ¶
type Status struct {
State string `json:"state"`
Message string `json:"message"`
Title string `json:"title"`
Fetched int64 `json:"fetched"`
Size int64 `json:"size"`
Allocated int64 `json:"allocated"`
Ready int `json:"ready"`
Failed int `json:"failed"`
Paused bool `json:"paused"`
Selection []Selection `json:"selection"`
Viewers int `json:"viewers"`
Items []Item `json:"items"`
}
Click to show internal directories.
Click to hide internal directories.