-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathblock.go
36 lines (29 loc) · 1.01 KB
/
block.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) Efficient Go Authors
// Licensed under the Apache License 2.0.
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.
// Package block contains common functionality for interacting with TSDB blocks
// in the context of Thanos.
package block
import (
"context"
"fmt"
"github.com/oklog/ulid"
)
const (
// MetaFilename is the known JSON filename for meta information.
MetaFilename = "meta.json"
)
// Download downloads directory that is meant to be block directory. If any of the files
// have a hash calculated in the meta file and it matches with what is in the destination path then
// we do not download it. We always re-download the meta file.
// BUG(bwplotka): No known bugs, but if there was one, it would be outlined here.
func Download(ctx context.Context, id ulid.ULID, dst string) error {
fmt.Println("downloaded")
return nil
}
// cleanUp cleans the partially uploaded files.
func cleanUp(ctx context.Context, id ulid.ULID) error {
fmt.Println("cleaned")
return nil
}