aboutsummaryrefslogtreecommitdiff
path: root/object/fetch/fetcher.go
blob: b0c3d099e7a10fd0cf6590c39eee8c4d87c464aa (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package fetch

import objectstore "codeberg.org/lindenii/furgit/object/store"

// 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 objectstore.Store
}

// New returns a Fetcher that reads objects from store.
//
// The returned Fetcher does not take ownership of store.
func New(store objectstore.Store) *Fetcher {
	return &Fetcher{store: store}
}