diff --git a/api.go b/api.go index 0c1f85950..7aa022582 100644 --- a/api.go +++ b/api.go @@ -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 { diff --git a/translate.go b/translate.go index 695e38f91..6cb940d53 100644 --- a/translate.go +++ b/translate.go @@ -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, } }