Documentation
¶
Overview ¶
Package storage defines the public object-storage boundary used by upload collections. Document stores never receive file bytes.
Index ¶
Constants ¶
const MaxListPageSize = 1_000
MaxListPageSize bounds one adapter listing response. Reconciliation streams pages so a large bucket never has to fit in memory.
Variables ¶
var ErrNotFound = errors.New("object not found")
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Put(context.Context, string, io.Reader, int64, string) error
Open(context.Context, string) (io.ReadCloser, Object, error)
Delete(context.Context, string) error
List(context.Context, ListRequest) (ListPage, error)
}
Backend is the smallest contract required by upload delivery, cleanup, and orphan reconciliation. Implementations must treat Put of an existing key as an atomic replacement, Delete of a missing key as a successful no-op, and List pages as key-ordered, unique, restricted to the requested prefix, no larger than the requested limit, and carrying an authoritative non-zero ModifiedAt timestamp. NextCursor must advance and remain stable for the duration of one listing. Ridu still revalidates object ownership and committed upload references immediately before destructive reconciliation.
type HealthBackend ¶
HealthBackend is implemented by production backends that can verify their required dependency without reading or mutating an application object. Ridu includes it in /readyz when available; custom backends should keep the check bounded by Context and safe to call repeatedly.
type ListRequest ¶
ListRequest selects one bounded, stable page of object metadata. Cursor is opaque to callers and must be returned unchanged from a prior ListPage.