aboutsummaryrefslogtreecommitdiff
path: root/object/fetch/fetcher.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-25 19:33:32 +0000
committerGravatar Runxi Yu2026-03-25 19:33:57 +0000
commit1aa5cad4c8d6455eeb1f10893549e18bcca11996 (patch)
tree31082a30bde08639fc764c52c3cf2283489f3302 /object/fetch/fetcher.go
parentTODO: updates (diff)
signatureNo signature
object/fetch: Rename from object/resolve
Diffstat (limited to 'object/fetch/fetcher.go')
-rw-r--r--object/fetch/fetcher.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/object/fetch/fetcher.go b/object/fetch/fetcher.go
new file mode 100644
index 00000000..ed4e74a1
--- /dev/null
+++ b/object/fetch/fetcher.go
@@ -0,0 +1,17 @@
+package fetch
+
+import objectstorer "codeberg.org/lindenii/furgit/object/storer"
+
+// Fetcher resolves parsed and streamed objects from an object store.
+//
+// A Fetcher does not take ownership of the store and does not close it.
+type Fetcher struct {
+ store objectstorer.Store
+}
+
+// New returns a Fetcher that reads objects from store.
+//
+// The returned Fetcher does not take ownership of store.
+func New(store objectstorer.Store) *Fetcher {
+ return &Fetcher{store: store}
+}