mirror of https://github.com/prometheus/prometheus
Remove obsolete FromData function (#540)
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>pull/5805/head
parent
8921f18eb3
commit
719b57db44
|
@ -1,4 +1,5 @@
|
||||||
## master / unreleased
|
## master / unreleased
|
||||||
|
- [REMOVED] `FromData` is considered unused so was removed.
|
||||||
|
|
||||||
## 0.6.1
|
## 0.6.1
|
||||||
- [BUGFIX] Update `last` after appending a non-overlapping chunk in `chunks.MergeOverlappingChunks`. [#539](https://github.com/prometheus/tsdb/pull/539)
|
- [BUGFIX] Update `last` after appending a non-overlapping chunk in `chunks.MergeOverlappingChunks`. [#539](https://github.com/prometheus/tsdb/pull/539)
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
package chunkenc
|
package chunkenc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
@ -48,15 +47,6 @@ type Chunk interface {
|
||||||
NumSamples() int
|
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.
|
// Appender adds sample pairs to a chunk.
|
||||||
type Appender interface {
|
type Appender interface {
|
||||||
Append(int64, float64)
|
Append(int64, float64)
|
||||||
|
|
Loading…
Reference in New Issue