Documentation ¶
Index ¶
- func CreateLogByFields(fields map[string]string) *protocol.Log
- func CreateLogs(kvs ...string) *protocol.Log
- func GetAvailableLocalAddress(t testing.TB) string
- func GetTestConfig(configName string) string
- func LoadDefaultConfig() *pluginmanager.LogstoreConfig
- func LoadMockConfig(project, logstore, configName, jsonStr string) *pluginmanager.LogstoreConfig
- func PickEvent(events []models.PipelineEvent, name string) models.PipelineEvent
- func PickLogs(logs []*protocol.Log, pickKey string, pickVal string) (res []*protocol.Log)
- func PluginStart() error
- func PluginStop(forceFlushFlag bool) error
- func ReadLogVal(log *protocol.Log, key string) string
- type MockCollector
- func (c *MockCollector) AddData(tags map[string]string, fields map[string]string, t ...time.Time)
- func (c *MockCollector) AddDataArray(tags map[string]string, columns []string, values []string, t ...time.Time)
- func (c *MockCollector) AddDataArrayWithContext(tags map[string]string, columns []string, values []string, ...)
- func (c *MockCollector) AddDataWithContext(tags map[string]string, fields map[string]string, ctx map[string]interface{}, ...)
- func (c *MockCollector) AddRawLog(log *protocol.Log)
- func (c *MockCollector) AddRawLogWithContext(log *protocol.Log, ctx map[string]interface{})
- type MockLog
- type MockMetricCollector
- func (m *MockMetricCollector) AddData(tags map[string]string, fields map[string]string, t ...time.Time)
- func (m *MockMetricCollector) AddDataArray(tags map[string]string, columns []string, values []string, t ...time.Time)
- func (m *MockMetricCollector) AddDataArrayWithContext(tags map[string]string, columns []string, values []string, ...)
- func (m *MockMetricCollector) AddDataWithContext(tags map[string]string, fields map[string]string, ctx map[string]interface{}, ...)
- func (m *MockMetricCollector) AddRawLog(log *protocol.Log)
- func (m *MockMetricCollector) AddRawLogWithContext(log *protocol.Log, ctx map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogs ¶
func GetAvailableLocalAddress ¶ added in v1.4.0
GetAvailableLocalAddress finds an available local port and returns an endpoint describing it. The port is available for opening when this function returns provided that there is no race by some other code to grab the same port immediately.
func GetTestConfig ¶
func LoadDefaultConfig ¶
func LoadDefaultConfig() *pluginmanager.LogstoreConfig
func LoadMockConfig ¶
func LoadMockConfig(project, logstore, configName, jsonStr string) *pluginmanager.LogstoreConfig
project, logstore, config, jsonStr
func PickEvent ¶ added in v1.4.0
func PickEvent(events []models.PipelineEvent, name string) models.PipelineEvent
PickEvent select one of original events by the specific event name.
func PickLogs ¶ added in v1.4.0
PickLogs select some of original logs to new res logs by the specific pickKey and pickVal.
func PluginStart ¶
func PluginStart() error
func PluginStop ¶
Types ¶
type MockCollector ¶
func (*MockCollector) AddDataArray ¶
func (*MockCollector) AddDataArrayWithContext ¶ added in v1.1.2
func (*MockCollector) AddDataWithContext ¶ added in v1.1.2
func (*MockCollector) AddRawLog ¶
func (c *MockCollector) AddRawLog(log *protocol.Log)
func (*MockCollector) AddRawLogWithContext ¶ added in v1.1.2
func (c *MockCollector) AddRawLogWithContext(log *protocol.Log, ctx map[string]interface{})
type MockMetricCollector ¶
type MockMetricCollector struct { Logs []*protocol.Log Tags map[string]string RawLogs []*protocol.Log // Benchmark switch ignore the cpu and memory performance influences when opening. Benchmark bool }
func (*MockMetricCollector) AddDataArray ¶
func (*MockMetricCollector) AddDataArrayWithContext ¶ added in v1.1.2
func (*MockMetricCollector) AddDataWithContext ¶ added in v1.1.2
func (*MockMetricCollector) AddRawLog ¶
func (m *MockMetricCollector) AddRawLog(log *protocol.Log)
func (*MockMetricCollector) AddRawLogWithContext ¶ added in v1.1.2
func (m *MockMetricCollector) AddRawLogWithContext(log *protocol.Log, ctx map[string]interface{})
Click to show internal directories.
Click to hide internal directories.