MCPcopy Index your code
hub / github.com/perkeep/perkeep / New

Function New

pkg/sorted/buffer/buffer.go:35–41  ·  view source on GitHub ↗

New returns a sorted.KeyValue implementation that adds a Flush method to flush the buffer to the backing storage. A flush will also be performed when maxBufferBytes are reached. If maxBufferBytes <= 0, no automatic flushing is performed.

(buffer, backing sorted.KeyValue, maxBufferBytes int64)

Source from the content-addressed store, hash-verified

33// also be performed when maxBufferBytes are reached. If
34// maxBufferBytes <= 0, no automatic flushing is performed.
35func New(buffer, backing sorted.KeyValue, maxBufferBytes int64) *KeyValue {
36 return &KeyValue{
37 buf: buffer,
38 back: backing,
39 maxBuffer: maxBufferBytes,
40 }
41}
42
43var _ sorted.KeyValue = (*KeyValue)(nil)
44

Callers 1

TestBufferFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestBufferFunction · 0.56