Versions in this module Expand all Collapse all v0 v0.2.1 Apr 6, 2017 Changes in this version + var ErrShortRead = errors.New("short read") + type ClusterPeer interface + Current func(cluster.PeerType) []string + State func() map[string]interface{} + type Doer interface + Do func(*http.Request) (*http.Response, error) v0.2.0 Feb 25, 2017 Changes in this version type API + func (a *API) Close() error v0.1.3 Feb 17, 2017 Changes in this version + const APIPathInternalStream + const APIPathUserStream type Log + Stream func(context.Context, QueryParams) <-chan []byte + type QueryParams struct + From time.Time + Q string + Regex bool + To time.Time + func (qp *QueryParams) DecodeFrom(u *url.URL) error + func (qp *QueryParams) EncodeTo(u *url.URL) + func (qp *QueryParams) MarshalJSON() ([]byte, error) + func (qp *QueryParams) UnmarshalJSON(data []byte) error type QueryResult + Params QueryParams v0.1.2 Jan 20, 2017 Changes in this version type Log + Close func() error v0.1.1 Jan 17, 2017 v0.1.0 Jan 16, 2017 Changes in this version + const APIPathClusterState + const APIPathInternalQuery + const APIPathReplicate + const APIPathUserQuery + var ErrNoSegmentsAvailable = errors.New("no segments available") + type API struct + func NewAPI(peer *cluster.Peer, log Log, ...) *API + func (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Compacter struct + func NewCompacter(log Log, segmentTargetSize int64, retain time.Duration, purge time.Duration, ...) *Compacter + func (c *Compacter) Run() + func (c *Compacter) Stop() + type Consumer struct + func NewConsumer(peer *cluster.Peer, client *http.Client, segmentTargetSize int64, ...) *Consumer + func (c *Consumer) Run() + func (c *Consumer) Stop() + type Log interface + Create func() (WriteSegment, error) + Overlapping func() ([]ReadSegment, error) + Purgeable func(oldestModTime time.Time) ([]TrashSegment, error) + Query func(from, to time.Time, q string, regex, statsOnly bool) (QueryResult, error) + Sequential func() ([]ReadSegment, error) + Stats func() (LogStats, error) + Trashable func(oldestRecord time.Time) ([]ReadSegment, error) + func NewFileLog(fs fs.Filesystem, root string, segmentTargetSize, segmentBufferSize int64) (Log, error) + type LogStats struct + ActiveBytes int64 + ActiveSegments int64 + FlushedBytes int64 + FlushedSegments int64 + ReadingBytes int64 + ReadingSegments int64 + TrashedBytes int64 + TrashedSegments int64 + type QueryResult struct + Duration string + ErrorCount int + From string + MaxDataSetSize int64 + NodesQueried int + Q string + Records io.ReadCloser + Regex bool + SegmentsQueried int + To string + func (qr *QueryResult) DecodeFrom(resp *http.Response) error + func (qr *QueryResult) EncodeTo(w http.ResponseWriter) + func (qr *QueryResult) Merge(other QueryResult) error + type ReadSegment interface + Purge func() error + Reset func() error + Trash func() error + type TrashSegment interface + Purge func() error + type WriteSegment interface + Close func(low, high ulid.ULID) error + Delete func() error