Documentation
¶
Index ¶
- Constants
- func FLBPluginConfigKey(plugin unsafe.Pointer, key string) string
- func FLBPluginGetContext(proxyCtx unsafe.Pointer) interface{}
- func FLBPluginRegister(def unsafe.Pointer, name, desc string) int
- func FLBPluginRegisterWithEventType(def unsafe.Pointer, eventType int, name, desc string) int
- func FLBPluginSetContext(plugin unsafe.Pointer, ctx interface{})
- func FLBPluginUnregister(def unsafe.Pointer)
- func GetRecord(dec *FLBDecoder) (ret int, ts interface{}, rec map[interface{}]interface{})
- type AggregationType
- type CMetrics
- type FLBDecoder
- type FLBOutPlugin
- type FLBPluginProxyDef
- type FLBTime
- type MetricType
Constants ¶
View Source
const ( FLB_ERROR = C.FLB_ERROR FLB_OK = C.FLB_OK FLB_RETRY = C.FLB_RETRY FLB_PROXY_OUTPUT_PLUGIN = C.FLB_PROXY_OUTPUT_PLUGIN FLB_PROXY_GOLANG = C.FLB_PROXY_GOLANG FLB_OUTPUT_LOGS = C.FLB_OUTPUT_LOGS FLB_OUTPUT_METRICS = C.FLB_OUTPUT_METRICS FLB_OUTPUT_TRACES = C.FLB_OUTPUT_TRACES )
Define constants matching Fluent Bit core
Variables ¶
This section is empty.
Functions ¶
func FLBPluginGetContext ¶
FLBPluginGetContext reads the context associated with proxyCtx.
func FLBPluginRegister ¶
When the FLBPluginInit is triggered by Fluent Bit, a plugin context is passed and the next step is to invoke this FLBPluginRegister() function to fill the required information: type, proxy type, flags name and description.
func FLBPluginSetContext ¶
FLBPluginSetContext sets the context for plugin to ctx.
Limit FLBPluginSetContext calls to once per plugin instance for best performance.
func FLBPluginUnregister ¶
Release resources allocated by the plugin initialization
func GetRecord ¶
func GetRecord(dec *FLBDecoder) (ret int, ts interface{}, rec map[interface{}]interface{})
Types ¶
type AggregationType ¶
type AggregationType int64
const ( UNSPECIFIED AggregationType = 0 DELTA AggregationType = 1 CUMMULATIVE AggregationType = 2 )
func (AggregationType) String ¶
func (at AggregationType) String() string
type CMetrics ¶
type CMetrics struct {
Meta struct {
Cmetrics map[string]interface{} `mapstructure:"cmetrics"`
External map[string]interface{} `mapstructure:"external"`
Processing struct {
StaticLabels []interface{} `mapstructure:"static_labels"`
} `mapstructure:"processing"`
} `mapstructure:"meta"`
Metrics []struct {
Meta struct {
AggregationType AggregationType `mapstructure:"aggregation_type"`
Labels []string `mapstructure:"labels"`
/* Formatted full qualified metric name is: namespace_subsystem_name */
Opts struct {
Desc string `mapstructure:"desc"`
Name string `mapstructure:"name"`
Namespace string `mapstructure:"ns"`
Subsystem string `mapstructure:"ss"`
} `mapstructure:"opts"`
Type MetricType `mapstructure:"type"`
Ver int `mapstructure:"ver"`
} `mapstructure:"meta"`
Values []struct {
Hash int64 `mapstructure:"hash"`
Labels []string `mapstructure:"labels"`
Ts int64 `mapstructure:"ts"`
Value float64 `mapstructure:"value"`
} `mapstructure:"values"`
} `mapstructure:"metrics"`
}
func ConvertRecordToCMetrics ¶
func ConvertRecordToCMetrics(record map[interface{}]interface{}) (cMetrics CMetrics)
ConvertRecordToCMetrics converts the data returned by GetRecord() to a CMetrics struct
type FLBDecoder ¶
type FLBDecoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoder(data unsafe.Pointer, length int) *FLBDecoder
type FLBOutPlugin ¶
type FLBOutPlugin C.struct_flbgo_output_plugin
type FLBPluginProxyDef ¶
type FLBPluginProxyDef C.struct_flb_plugin_proxy_def
Local type to define a plugin definition
type FLBTime ¶
func (FLBTime) ConvertExt ¶
func (f FLBTime) ConvertExt(v interface{}) interface{}
type MetricType ¶
type MetricType int64
const ( COUNTER MetricType = 0 GAUGE MetricType = 1 HISTOGRAM MetricType = 2 SUMMARY MetricType = 3 UNTYPED MetricType = 4 )
func (MetricType) String ¶
func (mt MetricType) String() string
Click to show internal directories.
Click to hide internal directories.