aboutsummaryrefslogtreecommitdiff
path: root/network/receivepack/service/options.go
blob: e183b709300f05418fc6251276ab4e5f3fb51b69 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package service

import (
	"codeberg.org/lindenii/furgit/common/iowrap"
	commitgraphread "codeberg.org/lindenii/furgit/format/commitgraph/read"
	objectstore "codeberg.org/lindenii/furgit/object/store"
	refstore "codeberg.org/lindenii/furgit/ref/store"
)

// Options configures one protocol-independent receive-pack service.
//
// Service borrows all configured dependencies.
//
// Refs and ExistingObjects are required and must be non-nil.
// ObjectIngress is required if Execute may need to ingest or quarantine a
// pack.
// CommitGraph, Progress, Hook, and HookIO are optional; when provided they are also
// borrowed for the duration of Execute.
type Options struct {
	Refs interface {
		refstore.ReadingStore
		refstore.TransactionalStore
		refstore.BatchStore
	}
	ExistingObjects objectstore.Reader
	ObjectIngress   objectstore.Quarantiner
	CommitGraph     *commitgraphread.Reader
	Progress        iowrap.WriteFlusher
	Hook            Hook
	HookIO          HookIO
}