generate

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 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 SchemaPlan

type SchemaPlan struct {
	StoragePlan             *StoragePlan
	Tags                    TagCardinalities
	PointsPerSeriesPerShard int
}

func (*SchemaPlan) PrintPlan

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

func (*SchemaPlan) String

func (p *SchemaPlan) String() string

type SchemaSpec

type SchemaSpec struct {
	Tags                    TagCardinalities
	PointsPerSeriesPerShard int
}

func (*SchemaSpec) AddFlags

func (s *SchemaSpec) AddFlags(fs *flag.FlagSet)

func (*SchemaSpec) Plan

func (s *SchemaSpec) Plan(sp *StoragePlan) (*SchemaPlan, error)

type StoragePlan

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

func (*StoragePlan) EndTime

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

func (*StoragePlan) InitFileSystem

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

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

func (*StoragePlan) InitMetadata

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

func (*StoragePlan) NodeShardGroups

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

NodeShardGroups returns ShardGroupInfo with Shards limited to the current node

func (*StoragePlan) PrintPlan

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

func (*StoragePlan) ShardGroups

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

func (*StoragePlan) ShardPath

func (p *StoragePlan) ShardPath() string

func (*StoragePlan) String

func (p *StoragePlan) String() string

func (*StoragePlan) TimeRange

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

func (*StoragePlan) TimeSpan

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

TimeSpan returns the total duration for which the data set.

func (*StoragePlan) Validate

func (p *StoragePlan) Validate() error

type StorageSpec

type StorageSpec struct {
	StartTime     string
	Database      string
	Retention     string
	ReplicaN      int
	ShardCount    int
	ShardDuration time.Duration
}

func (*StorageSpec) AddFlags

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

func (*StorageSpec) Plan

func (a *StorageSpec) Plan(server server.Interface) (*StoragePlan, 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