golang / golang/groupcache

Exposed interface Sink not usable

Open
#89 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13.3k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

I am currently trying to implement a custom sink but the definition has an [unexported method](https://github.com/golang/groupcache/blob/master/sinks.go#L41-L42) which makes it impossible to implement a custom `Sink`. Is this intended, if not, will you accept a PR changing it?

My use-case for a custom Sink, currently I am caching 4MB chunks and would like to only read 500 bytes at a time at different offsets. But for each call, groupcache allocates full 4MB when calling `cloneBytes()`, I would like to allocate right amount to reduce allocs.

cc @bradfitz

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.