Documentation ¶
Overview ¶
Package shipper detects directories on the local file system and uploads them to a block storage.
Index ¶
Constants ¶
const MetaFilename = "thanos.shipper.json"
MetaFilename is the known JSON filename for meta information.
Variables ¶
This section is empty.
Functions ¶
func WriteMetaFile ¶
WriteMetaFile writes the given meta into <dir>/thanos.shipper.json.
Types ¶
type Meta ¶
Meta defines the fomart thanos.shipper.json file that the shipper places in the data directory.
func ReadMetaFile ¶
ReadMetaFile reads the given meta from <dir>/thanos.shipper.json.
type Shipper ¶
type Shipper struct {
// contains filtered or unexported fields
}
Shipper watches a directory for matching files and directories and uploads them to a remote data store.
func New ¶
func New( logger log.Logger, r prometheus.Registerer, dir string, bucket objstore.Bucket, lbls func() labels.Labels, ) *Shipper
New creates a new shipper that detects new TSDB blocks in dir and uploads them to remote if necessary. It attaches the return value of the labels getter to uploaded data.
func (*Shipper) Sync ¶
Sync performs a single synchronization, which ensures all local blocks have been uploaded to the object bucket once. It is not concurrency-safe.
func (*Shipper) Timestamps ¶
Timestamps returns the minimum timestamp for which data is available and the highest timestamp of blocks that were successfully uploaded.