Documentation
¶
Overview ¶
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
const ( EVENT_FIELD_KEY = `event` HOSTNAME_TAG_KEY = `hostname` CLUSTER_TAG_KEY = `cluster` TYPE_TAG_KEY = `type` TYPEID_TAG_KEY = `type-id` STYPE_TAG_KEY = `stype` STYPEID_TAG_KEY = `stype-id` LOG_FIELD_KEY = `log` )
Variables ¶
var AvailableStorageBackends map[string]Storage = map[string]Storage{ "sqlite": new(sqliteStorage), "postgres": new(postgresStorage), }
var MetricToSchema map[string]string = map[string]string{ EVENT_FIELD_KEY: "field", LOG_FIELD_KEY: "field", HOSTNAME_TAG_KEY: "hostname", TYPEID_TAG_KEY: "typeid", STYPEID_TAG_KEY: "stypeid", TYPE_TAG_KEY: "type", STYPE_TAG_KEY: "stype", CLUSTER_TAG_KEY: "", }
Functions ¶
This section is empty.
Types ¶
type QueryCondition ¶
type QueryRequest ¶
type QueryRequest struct {
Event string
Hostname string
Cluster string
Conditions []QueryCondition
From int64
To int64
QueryType QueryRequestType
}
type QueryRequestType ¶
type QueryRequestType int
const ( QueryTypeEvent QueryRequestType = 0 QueryTypeLog QueryRequestType = 1 )
type QueryResult ¶
type QueryResult struct {
Error error
Results []QueryResultEvent
}
type QueryResultEvent ¶
type Storage ¶
type Storage interface {
Init(config json.RawMessage, stats *storageStats) error
Query(request QueryRequest) (QueryResult, error)
Write(msg []lp.CCMessage) error
Delete(to int64) error
GetName() string
Close()
}
type StorageBuffer ¶
type StorageBuffer interface {
Lock()
Unlock()
Add(msg lp.CCMessage)
Get() []lp.CCMessage
Clear()
Len() int
}
func NewStorageBuffer ¶
func NewStorageBuffer(cap int) (StorageBuffer, error)
type StorageManager ¶
type StorageManager interface {
Close()
Start()
Query(request QueryRequest) (QueryResult, error)
SetInput(input chan lp.CCMessage)
GetInput() chan lp.CCMessage
Stats() StorageManagerStats
}
func NewStorageManager ¶
func NewStorageManager(wg *sync.WaitGroup, rawConfig json.RawMessage) (StorageManager, error)