Remove obsolete FromData function (#540)

Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
This commit is contained in:
zhulongcheng 2019-03-06 17:12:28 +08:00 committed by Krasi Georgiev
parent 8921f18eb3
commit 719b57db44
2 changed files with 1 additions and 10 deletions

View File

@ -1,4 +1,5 @@
## master / unreleased
- [REMOVED] `FromData` is considered unused so was removed.
## 0.6.1
- [BUGFIX] Update `last` after appending a non-overlapping chunk in `chunks.MergeOverlappingChunks`. [#539](https://github.com/prometheus/tsdb/pull/539)

View File

@ -14,7 +14,6 @@
package chunkenc
import (
"fmt"
"sync"
"github.com/pkg/errors"
@ -48,15 +47,6 @@ type Chunk interface {
NumSamples() int
}
// FromData returns a chunk from a byte slice of chunk data.
func FromData(e Encoding, d []byte) (Chunk, error) {
switch e {
case EncXOR:
return &XORChunk{b: bstream{count: 0, stream: d}}, nil
}
return nil, fmt.Errorf("unknown chunk encoding: %d", e)
}
// Appender adds sample pairs to a chunk.
type Appender interface {
Append(int64, float64)