This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
/
options.go
85 lines (68 loc) · 2.95 KB
/
options.go
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package bitswap
import (
"time"
"github.com/ipfs/go-bitswap/server"
"github.com/ipfs/go-bitswap/tracer"
delay "github.com/ipfs/go-ipfs-delay"
libipfs "github.com/ipfs/go-libipfs/bitswap"
)
// Option is interface{} of server.Option or client.Option or func(*Bitswap)
// wrapped in a struct to gain strong type checking.
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.Option instead
type Option = libipfs.Option
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.EngineBlockstoreWorkerCount instead
func EngineBlockstoreWorkerCount(count int) Option {
return libipfs.EngineBlockstoreWorkerCount(count)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.EngineTaskWorkerCount instead
func EngineTaskWorkerCount(count int) Option {
return libipfs.EngineTaskWorkerCount(count)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.MaxOutstandingBytesPerPeer instead
func MaxOutstandingBytesPerPeer(count int) Option {
return libipfs.MaxOutstandingBytesPerPeer(count)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.TaskWorkerCount instead
func TaskWorkerCount(count int) Option {
return libipfs.TaskWorkerCount(count)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.ProvideEnabled instead
func ProvideEnabled(enabled bool) Option {
return libipfs.ProvideEnabled(enabled)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.SetSendDontHaves instead
func SetSendDontHaves(send bool) Option {
return libipfs.SetSendDontHaves(send)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.WithPeerBlockRequestFilter instead
func WithPeerBlockRequestFilter(pbrf libipfs.PeerBlockRequestFilter) Option {
return libipfs.WithPeerBlockRequestFilter(pbrf)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.WithScoreLedger instead
func WithScoreLedger(scoreLedger server.ScoreLedger) Option {
return libipfs.WithScoreLedger(scoreLedger)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.WithTargetMessageSize instead
func WithTargetMessageSize(tms int) Option {
return libipfs.WithTargetMessageSize(tms)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.WithTaskComparator instead
func WithTaskComparator(comparator libipfs.TaskComparator) Option {
return libipfs.WithTaskComparator(comparator)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.ProviderSearchDelay instead
func ProviderSearchDelay(newProvSearchDelay time.Duration) Option {
return libipfs.ProviderSearchDelay(newProvSearchDelay)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.RebroadcastDelay instead
func RebroadcastDelay(newRebroadcastDelay delay.D) Option {
return libipfs.RebroadcastDelay(newRebroadcastDelay)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.SetSimulateDontHavesOnTimeout instead
func SetSimulateDontHavesOnTimeout(send bool) Option {
return libipfs.SetSimulateDontHavesOnTimeout(send)
}
// Deprecated: use github.com/ipfs/go-libipfs/bitswap.WithTracer instead
func WithTracer(tap tracer.Tracer) Option {
return libipfs.WithTracer(tap)
}