blob

package
v0.4.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package blob defines reopenable blob descriptors and helper constructors that can be cached with cache.ReadWriterOf or cache.FailoverOf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	Meta() Meta
	Open() (io.ReadCloser, error)
}

Entry is a reopenable descriptor of a blob.

func FromHTTPResponse

func FromHTTPResponse(resp *http.Response) Entry

FromHTTPResponse creates a transient entry backed by an HTTP response body.

func FromReadCloser

func FromReadCloser(rc io.ReadCloser, meta Meta) Entry

FromReadCloser creates a transient entry from an io.ReadCloser.

func FromReader

func FromReader(r io.Reader, meta Meta) Entry

FromReader creates a transient entry from an io.Reader.

type HTTPExtra

type HTTPExtra struct {
	StatusCode int
	Header     http.Header
}

HTTPExtra is a conventional HTTP response payload for Meta.Extra.

type Meta

type Meta struct {
	Name    string
	Size    int64
	ModTime time.Time
	Extra   any
}

Meta describes a blob.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL