aboutsummaryrefslogtreecommitdiff
path: root/object/fetch
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-08 07:21:10 +0000
committerGravatar Runxi Yu2026-06-08 07:21:10 +0000
commitd8edb043e5a70c2cb2f784d69c1e638d3f14ec92 (patch)
tree5cedc52a1d4abf83235c2b03932bd85fc4f543d3 /object/fetch
parentobject/fetch: Port path (diff)
object/fetch: Port fetcher itself
Diffstat (limited to 'object/fetch')
-rw-r--r--object/fetch/fetcher.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/object/fetch/fetcher.go b/object/fetch/fetcher.go
new file mode 100644
index 00000000..653baf22
--- /dev/null
+++ b/object/fetch/fetcher.go
@@ -0,0 +1,20 @@
+package fetch
+
+import "lindenii.org/go/furgit/object/store"
+
+// Fetcher provides ordinary object access above an object store.
+//
+// It exposes object metadata, typed object loading, tree-ish and commit-ish
+// peeling, path resolution, one-tree fs views, and blob content streaming.
+//
+// Labels: MT-Safe.
+type Fetcher struct {
+ store store.ObjectReader
+}
+
+// New returns a Fetcher that reads objects from store.
+//
+// Labels: Deps-Borrowed, Life-Parent.
+func New(store store.ObjectReader) *Fetcher {
+ return &Fetcher{store: store}
+}