Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when a cache entry does not exist.
Functions ¶
This section is empty.
Types ¶
type ActionEntry ¶
type ActionEntry struct {
OutputID string `json:"output_id"` // hex-encoded output ID from the go tool
BlobHash string `json:"blob_hash"` // canonical blob ref: "blake3:<hex>"
Size int64 `json:"size"` // blob size in bytes
}
ActionEntry records the mapping from an actionID to a stored blob.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the build cache HTTP API.
GET /buildcache/{actionID} → streams blob body with X-Output-ID + Content-Length headers PUT /buildcache/{actionID}?output_id= → stores blob, returns 204
func NewHandler ¶
func NewHandler(index *Index, store store.Store, opts ...HandlerOption) *Handler
NewHandler creates a new build cache handler.
type HandlerOption ¶
type HandlerOption func(*Handler)
HandlerOption configures a Handler.
func WithLogger ¶
func WithLogger(logger *slog.Logger) HandlerOption
WithLogger sets the logger for the handler.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index manages the actionID → blob mapping using metadb envelope storage.
func NewIndex ¶
func NewIndex(entries *metadb.EnvelopeIndex) *Index
NewIndex creates a new build cache index backed by the given envelope index.
Click to show internal directories.
Click to hide internal directories.