Skip to content
This repository was archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Remove FromData function
Browse files Browse the repository at this point in the history
Signed-off-by: zhulongcheng <[email protected]>
  • Loading branch information
zhulongcheng committed Mar 6, 2019
1 parent 8921f18 commit c99069e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 0 additions & 10 deletions chunkenc/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package chunkenc

import (
"fmt"
"sync"

"github.com/pkg/errors"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c99069e

Please sign in to comment.