unexport some translation related consts, remove an unused one

This commit is contained in:
Matt Jaffee 2018-07-02 08:20:53 -05:00
parent 91f531f2cd
commit 2210480198
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
2 changed files with 5 additions and 9 deletions

6
api.go
View file

@ -788,8 +788,8 @@ func (api *API) ResizeAbort() error {
return errors.Wrap(err, "complete current job")
}
// TranslateStoreBufferSize is the buffer size used for streaming data.
const TranslateStoreBufferSize = 65536
// translateStoreBufferSize is the buffer size used for streaming data.
const translateStoreBufferSize = 65536
func (api *API) GetTranslateData(ctx context.Context, w io.WriteCloser, offset int64) error {
rc, err := api.server.primaryTranslateStore.Reader(ctx, offset)
@ -804,7 +804,7 @@ func (api *API) GetTranslateData(ctx context.Context, w io.WriteCloser, offset i
defer rc.Close()
defer w.Close()
buf := make([]byte, TranslateStoreBufferSize)
buf := make([]byte, translateStoreBufferSize)
// Copy from reader to client until store or client disconnect.
for {

View file

@ -24,11 +24,7 @@ const (
)
const (
DefaultReplicationRetryInterval = 1 * time.Second
)
const (
ReplicationBufferSize = 65536
defaultReplicationRetryInterval = 1 * time.Second
)
var (
@ -90,7 +86,7 @@ func NewTranslateFile() *TranslateFile {
MapSize: DefaultMapSize,
ReplicationRetryInterval: DefaultReplicationRetryInterval,
ReplicationRetryInterval: defaultReplicationRetryInterval,
}
}