cassandra

package
v0.0.0-...-e01a1e4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBenchmark

func NewBenchmark(dbSpecificConfig *SpecificConfig, dsConfig *source.DataSourceConfig) (targets.Benchmark, error)

func NewTarget

func NewTarget() targets.ImplementedTarget

Types

type Serializer

type Serializer struct{}

Serializer writes a Point in a serialized form for Cassandra

func (*Serializer) Serialize

func (s *Serializer) Serialize(p *data.Point, w io.Writer) (err error)

Serialize writes Point data to the given writer, conforming to the Cassandra format.

This function writes output that looks like: series_double,cpu,hostname=host_0,region=eu-west-1,datacenter=eu-west-1b,rack=67,os=Ubuntu16.10,arch=x86,team=NYC,service=7,service_version=0,service_environment=production,usage_guest_nice,2016-01-01,1451606400000000000,38.2431182911542820

Which the loader will decode into a statement that looks like this: INSERT INTO series_double(series_id,timestamp_ns,value) VALUES('cpu,hostname=host_0,region=eu-west-1,datacenter=eu-west-1b,rack=67,os=Ubuntu16.10,arch=x86,team=NYC,service=7,service_version=0,service_environment=production#usage_guest_nice#2016-01-01', 1451606400000000000, 38.2431182911542820)

type SpecificConfig

type SpecificConfig struct {
	Hosts             string        `yaml:"hosts" mapstructure:"hosts"`
	ReplicationFactor int           `yaml:"replication-factor" mapstructure:"replication-factor"`
	ConsistencyLevel  string        `yaml:"consistency" mapstructure:"consistency"`
	WriteTimeout      time.Duration `yaml:"write-timeout" mapstructureL:"write-timeout"`
}

Jump to

Keyboard shortcuts

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