Documentation
¶
Index ¶
- Variables
- func NewHandler(cfg HandlerConfig) (http.Handler, error)
- type Entry
- type Grant
- type HandlerConfig
- type Principal
- type Reservation
- type Service
- type ServiceStatus
- type Store
- func (s *Store) Close() error
- func (s *Store) EntryByID(ctx context.Context, id string) (Entry, error)
- func (s *Store) Finalize(ctx context.Context, p Principal, key, version string, declaredSize int64) (Entry, error)
- func (s *Store) Lookup(ctx context.Context, p Principal, key string, restoreKeys []string, ...) (Entry, bool, error)
- func (s *Store) OpenEntry(entry Entry) (io.ReadSeekCloser, error)
- func (s *Store) PutBlob(ctx context.Context, id string, body io.Reader) error
- func (s *Store) PutPart(ctx context.Context, id, blockID string, body io.Reader) error
- func (s *Store) Reserve(ctx context.Context, p Principal, key, version string) (Reservation, error)
- func (s *Store) SetBlockList(ctx context.Context, id string, blockIDs []string) error
- func (s *Store) SetStagingLimit(bytes int64)
- func (s *Store) Stats(ctx context.Context) (StoreStats, error)
- func (s *Store) Sweep(ctx context.Context, maxBytes int64, maxIdle time.Duration) error
- type StoreStats
- type Verifier
- type VerifierConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConflict = errors.New("cache entry already exists") ErrNotFound = errors.New("cache entry not found") ErrSizeMismatch = errors.New("cache size does not match uploaded blocks") ErrIncomplete = errors.New("cache upload is incomplete") ErrStagingFull = errors.New("cache staging budget exceeded") )
Functions ¶
func NewHandler ¶
func NewHandler(cfg HandlerConfig) (http.Handler, error)
Types ¶
type HandlerConfig ¶
type Principal ¶
func (Principal) AuthorizeMetadata ¶
func (p Principal) AuthorizeMetadata(metadata *entitypb.CacheMetadata) error
AuthorizeMetadata ensures request metadata cannot widen a signed grant. Cache identity is always derived from the verified token, never metadata.
func (Principal) FirstWritableScope ¶
func (Principal) ReadableScopes ¶
type Reservation ¶
type Reservation struct{ ID string }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Status ¶
func (s *Service) Status() ServiceStatus
type ServiceStatus ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) SetBlockList ¶
func (*Store) SetStagingLimit ¶
type StoreStats ¶
func ReadStoreStats ¶
func ReadStoreStats(ctx context.Context, root string) (StoreStats, error)
ReadStoreStats opens an existing database read-only for operator reporting. It never creates a cache directory or starts the receiver.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶
func NewVerifier(cfg VerifierConfig) (*Verifier, error)
Click to show internal directories.
Click to hide internal directories.