aboutsummaryrefslogtreecommitdiff
path: root/object/fetch/fetcher.go
blob: ed4e74a1eab9c50b364af622bedb93b48efa5c60 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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}
}