aboutsummaryrefslogtreecommitdiff
path: root/object/fetch
diff options
context:
space:
mode:
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}
+}