Documentation ¶
Index ¶
- func NewBlobService(host host.Host, r routing.ContentRouting, prefix string, ds datastore.Batching, ...) *blobService
- func WithBitswapOptions(opts ...bitswap.Option) network.BlobServiceOption
- func WithHashOnRead(enabled bool) network.BlobServiceOption
- func WithRateLimit(r float64, b int) network.BlobServiceOption
- func WithReprovideInterval(d time.Duration) network.BlobServiceOption
- type BlobServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlobService ¶
func NewBlobService( host host.Host, r routing.ContentRouting, prefix string, ds datastore.Batching, metrics module.BitswapMetrics, logger zerolog.Logger, opts ...network.BlobServiceOption, ) *blobService
NewBlobService creates a new BlobService.
func WithBitswapOptions ¶
func WithBitswapOptions(opts ...bitswap.Option) network.BlobServiceOption
WithBitswapOptions sets additional options for Bitswap exchange
func WithHashOnRead ¶
func WithHashOnRead(enabled bool) network.BlobServiceOption
WithHashOnRead sets whether or not the blobstore will rehash the blob data on read When set, calls to GetBlob will fail with an error if the hash of the data in storage does not match its CID
func WithRateLimit ¶
func WithRateLimit(r float64, b int) network.BlobServiceOption
WithRateLimit sets a rate limit on reads from the underlying datastore that allows up to r bytes per second and permits bursts of at most b bytes. Note that b should be set to at least the max blob size, otherwise blobs larger than b cannot be read from the blobstore.
func WithReprovideInterval ¶
func WithReprovideInterval(d time.Duration) network.BlobServiceOption
WithReprovideInterval sets the interval at which DHT provider entries are refreshed