Versions in this module Expand all Collapse all v0 v0.2.0 Oct 27, 2015 Changes in this version type PointsWriter + Subscriber interface{ ... } + func (w *PointsWriter) WritePointsInto(p *tsdb.IntoWriteRequest) error v0.1.9 Sep 22, 2015 Changes in this version + const DefaultShardMapperTimeout + const DefaultShardWriterTimeout + const DefaultWriteTimeout + const MaxMessageSize + const MuxHeader + var ErrInvalidConsistencyLevel = errors.New("invalid consistency level") + var ErrPartialWrite = errors.New("partial write") + var ErrTimeout = errors.New("timeout") + var ErrWriteFailed = errors.New("write failed") + func ReadTLV(r io.Reader) (byte, []byte, error) + func WriteTLV(w io.Writer, typ byte, buf []byte) error + type Config struct + ForceRemoteShardMapping bool + ShardMapperTimeout toml.Duration + ShardWriterTimeout toml.Duration + WriteTimeout toml.Duration + func NewConfig() Config + type ConsistencyLevel int + const ConsistencyLevelAll + const ConsistencyLevelAny + const ConsistencyLevelOne + const ConsistencyLevelQuorum + func ParseConsistencyLevel(level string) (ConsistencyLevel, error) + type MapShardRequest struct + func (m *MapShardRequest) ChunkSize() int32 + func (m *MapShardRequest) MarshalBinary() ([]byte, error) + func (m *MapShardRequest) Query() string + func (m *MapShardRequest) SetChunkSize(chunkSize int32) + func (m *MapShardRequest) SetQuery(query string) + func (m *MapShardRequest) SetShardID(id uint64) + func (m *MapShardRequest) ShardID() uint64 + func (m *MapShardRequest) UnmarshalBinary(buf []byte) error + type MapShardResponse struct + func NewMapShardResponse(code int, message string) *MapShardResponse + func (r *MapShardResponse) Code() int + func (r *MapShardResponse) Data() []byte + func (r *MapShardResponse) Fields() []string + func (r *MapShardResponse) MarshalBinary() ([]byte, error) + func (r *MapShardResponse) Message() string + func (r *MapShardResponse) SetCode(code int) + func (r *MapShardResponse) SetData(data []byte) + func (r *MapShardResponse) SetFields(fields []string) + func (r *MapShardResponse) SetMessage(message string) + func (r *MapShardResponse) SetTagSets(tagsets []string) + func (r *MapShardResponse) TagSets() []string + func (r *MapShardResponse) UnmarshalBinary(buf []byte) error + type PointsWriter struct + HintedHandoff interface{ ... } + Logger *log.Logger + MetaStore interface{ ... } + ShardWriter interface{ ... } + TSDBStore interface{ ... } + WriteTimeout time.Duration + func NewPointsWriter() *PointsWriter + func (w *PointsWriter) Close() error + func (w *PointsWriter) MapShards(wp *WritePointsRequest) (*ShardMapping, error) + func (w *PointsWriter) Open() error + func (w *PointsWriter) WritePoints(p *WritePointsRequest) error + type RemoteMapper struct + func NewRemoteMapper(c remoteShardConn, shardID uint64, stmt string, chunkSize int) *RemoteMapper + func (r *RemoteMapper) Close() + func (r *RemoteMapper) Fields() []string + func (r *RemoteMapper) NextChunk() (chunk interface{}, err error) + func (r *RemoteMapper) Open() (err error) + func (r *RemoteMapper) TagSets() []string + type Service struct + Listener net.Listener + Logger *log.Logger + MetaStore interface{ ... } + TSDBStore interface{ ... } + func NewService(c Config) *Service + func (s *Service) Close() error + func (s *Service) Open() error + func (s *Service) SetLogger(l *log.Logger) + type ShardMapper struct + ForceRemoteMapping bool + MetaStore interface{ ... } + TSDBStore interface{ ... } + func NewShardMapper(timeout time.Duration) *ShardMapper + func (s *ShardMapper) CreateMapper(sh meta.ShardInfo, stmt string, chunkSize int) (tsdb.Mapper, error) + type ShardMapping struct + Points map[uint64][]tsdb.Point + Shards map[uint64]*meta.ShardInfo + func NewShardMapping() *ShardMapping + func (s *ShardMapping) MapPoint(shardInfo *meta.ShardInfo, p tsdb.Point) + type ShardWriter struct + MetaStore interface{ ... } + func NewShardWriter(timeout time.Duration) *ShardWriter + func (w *ShardWriter) Close() error + func (w *ShardWriter) WriteShard(shardID, ownerID uint64, points []tsdb.Point) error + type WritePointsRequest struct + ConsistencyLevel ConsistencyLevel + Database string + Points []tsdb.Point + RetentionPolicy string + func (w *WritePointsRequest) AddPoint(name string, value interface{}, timestamp time.Time, tags map[string]string) + type WriteShardRequest struct + func (w *WriteShardRequest) AddPoint(name string, value interface{}, timestamp time.Time, tags map[string]string) + func (w *WriteShardRequest) AddPoints(points []tsdb.Point) + func (w *WriteShardRequest) MarshalBinary() ([]byte, error) + func (w *WriteShardRequest) Points() []tsdb.Point + func (w *WriteShardRequest) SetShardID(id uint64) + func (w *WriteShardRequest) ShardID() uint64 + func (w *WriteShardRequest) UnmarshalBinary(buf []byte) error + type WriteShardResponse struct + func (w *WriteShardResponse) Code() int + func (w *WriteShardResponse) MarshalBinary() ([]byte, error) + func (w *WriteShardResponse) Message() string + func (w *WriteShardResponse) SetCode(code int) + func (w *WriteShardResponse) SetMessage(message string) + func (w *WriteShardResponse) UnmarshalBinary(buf []byte) error