Skip to content

Commit

Permalink
Rename tsdb_errors to tsdberrors
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
  • Loading branch information
Sylvain Rabot committed May 14, 2019
1 parent 9ccfea9 commit 6cec9c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pkg/compact/downsample/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/chunkenc"
"github.com/prometheus/tsdb/chunks"
tsdb_errors "github.com/prometheus/tsdb/errors"
tsdberrors "github.com/prometheus/tsdb/errors"
"github.com/prometheus/tsdb/index"
"github.com/prometheus/tsdb/labels"
)
Expand Down Expand Up @@ -64,7 +64,7 @@ func Downsample(
// Remove blockDir in case of errors.
defer func() {
if err != nil {
var merr tsdb_errors.MultiError
var merr tsdberrors.MultiError
merr.Add(err)
merr.Add(os.RemoveAll(blockDir))
err = merr.Err()
Expand Down
6 changes: 3 additions & 3 deletions pkg/compact/downsample/streamed_block_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/chunks"
"github.com/prometheus/tsdb/fileutil"
tsdb_errors "github.com/prometheus/tsdb/errors"
tsdberrors "github.com/prometheus/tsdb/errors"
"github.com/prometheus/tsdb/index"
"github.com/prometheus/tsdb/labels"
)
Expand Down Expand Up @@ -84,7 +84,7 @@ func NewStreamedBlockWriter(
// We should close any opened Closer up to an error.
defer func() {
if err != nil {
var merr tsdb_errors.MultiError
var merr tsdberrors.MultiError
merr.Add(err)
for _, cl := range closers {
merr.Add(cl.Close())
Expand Down Expand Up @@ -170,7 +170,7 @@ func (w *streamedBlockWriter) Close() error {
}
w.finalized = true

merr := tsdb_errors.MultiError{}
merr := tsdberrors.MultiError{}

if w.ignoreFinalize {
// Close open file descriptors anyway.
Expand Down
4 changes: 2 additions & 2 deletions pkg/rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/rulefmt"
"github.com/prometheus/prometheus/rules"
tsdb_errors "github.com/prometheus/tsdb/errors"
tsdberrors "github.com/prometheus/tsdb/errors"
yaml "gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -112,7 +112,7 @@ func (r RuleGroup) MarshalYAML() (interface{}, error) {
// special field in RuleGroup file.
func (m *Managers) Update(dataDir string, evalInterval time.Duration, files []string) error {
var (
errs tsdb_errors.MultiError
errs tsdberrors.MultiError
filesMap = map[storepb.PartialResponseStrategy][]string{}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/runutil/runutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import (
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/pkg/errors"
tsdb_errors "github.com/prometheus/tsdb/errors"
tsdberrors "github.com/prometheus/tsdb/errors"
)

// Repeat executes f every interval seconds until stopc is closed.
Expand Down Expand Up @@ -111,7 +111,7 @@ func CloseWithLogOnErr(logger log.Logger, closer io.Closer, format string, a ...
// CloseWithErrCapture runs function and on error return error by argument including the given error (usually
// from caller function).
func CloseWithErrCapture(err *error, closer io.Closer, format string, a ...interface{}) {
merr := tsdb_errors.MultiError{}
merr := tsdberrors.MultiError{}

merr.Add(*err)
merr.Add(errors.Wrapf(closer.Close(), format, a...))
Expand Down

0 comments on commit 6cec9c1

Please sign in to comment.