generate

package
v1.5.1-0...-4d21ab9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkPlan

func WalkPlan(v Visitor, node Node)

Types

type Node

type Node interface {
	// contains filtered or unexported methods
}

type Plan

type Plan struct {
	Database                string
	Retention               string
	ReplicaN                int
	StartTime               time.Time
	ShardCount              int
	ShardDuration           time.Duration
	Tags                    TagCardinalities
	PointsPerSeriesPerShard int
	DatabasePath            string
	// contains filtered or unexported fields
}

func (*Plan) EndTime

func (p *Plan) EndTime() time.Time

func (*Plan) InitFileSystem

func (p *Plan) InitFileSystem(client server.MetaClient) error

InitFileSystem initializes the file system structure, cleaning up existing files and re-creating the appropriate shard directories.

func (*Plan) InitMetadata

func (p *Plan) InitMetadata(client server.MetaClient) (err error)

func (*Plan) NodeShardGroups

func (p *Plan) NodeShardGroups() []meta.ShardGroupInfo

NodeShardGroups returns ShardGroupInfo with Shards limited to the current node

func (*Plan) PrintPlan

func (p *Plan) PrintPlan(w io.Writer)

func (*Plan) ShardGroups

func (p *Plan) ShardGroups() []meta.ShardGroupInfo

func (*Plan) ShardPath

func (p *Plan) ShardPath() string

func (*Plan) String

func (p *Plan) String() string

func (*Plan) TimeRange

func (p *Plan) TimeRange() (start, end time.Time)

func (*Plan) TimeSpan

func (p *Plan) TimeSpan() time.Duration

TimeSpan returns the total duration for which the data set.

func (*Plan) Validate

func (p *Plan) Validate() error

type Spec

type Spec struct {
	StartTime               string
	Database                string
	Retention               string
	ReplicaN                int
	ShardCount              int
	ShardDuration           time.Duration
	Tags                    TagCardinalities
	PointsPerSeriesPerShard int
}

func (*Spec) AddFlags

func (a *Spec) AddFlags(fs *flag.FlagSet)

func (*Spec) Plan

func (a *Spec) Plan(server server.Interface) (*Plan, error)

type TagCardinalities

type TagCardinalities []int

func (TagCardinalities) Cardinality

func (t TagCardinalities) Cardinality() int

func (*TagCardinalities) Set

func (t *TagCardinalities) Set(tags string) error

func (TagCardinalities) String

func (t TagCardinalities) String() string

type Visitor

type Visitor interface {
	Visit(node Node) Visitor
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL