Documentation ¶
Overview ¶
Package hh implements a hinted handoff for writes
Index ¶
Constants ¶
View Source
const ( // DefaultMaxSize is the default maximum size of all hinted handoff queues in bytes. DefaultMaxSize = 1024 * 1024 * 1024 // DefaultMaxAge is the default maximum amount of time that a hinted handoff write // can stay in the queue. After this time, the write will be purged. DefaultMaxAge = 7 * 24 * time.Hour // DefaultRetryRateLimit is the default rate that hinted handoffs will be retried. // The rate is in bytes per second and applies across all nodes when retried. A // value of 0 disables the rate limit. DefaultRetryRateLimit = 0 // DefaultRetryInterval is the default amout of time the system waits before // attempting to flush hinted handoff queues. DefaultRetryInterval = time.Second )
Variables ¶
View Source
var ( ErrNotOpen = fmt.Errorf("queue not open") ErrQueueFull = fmt.Errorf("queue is full") ErrSegmentFull = fmt.Errorf("segment is full") )
View Source
var ErrHintedHandoffDisabled = fmt.Errorf("hinted handoff disabled")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func NewProcessor(dir string, writer shardWriter, options ProcessorOptions) (*Processor, error)
type ProcessorOptions ¶
type Service ¶
type Service struct { Logger *log.Logger ShardWriter shardWriter HintedHandoff interface { WriteShard(shardID, ownerID uint64, points []tsdb.Point) error Process() error PurgeOlderThan(when time.Duration) error } // contains filtered or unexported fields }
func NewService ¶
NewService returns a new instance of Service.
Click to show internal directories.
Click to hide internal directories.