output

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsoleType = "console"
)

Variables

This section is empty.

Functions

func Register

func Register(outputType string, factory Factory)

Types

type Config

type Config interface{}

type Extension

type Extension struct {
	Tenant    string
	ConfigKey string
}

type Factory

type Factory func(Config) (Output, error)

type Output

type Output interface {
	WriteMetricsV1([]*model.Metric, Extension)

	WriteBatchV4(configKey, targetKey, metricName string, array []*model.DetailData, c *PeriodCompleteness) error
}

func Composite

func Composite(array ...Output) Output

func Parse

func Parse(outputType string, config Config) (Output, error)

TODO 有一些output实例要复用的, 我们可以在最底层的output上再包一个RefOutput 第一次创建时触发底层output创建, 然后持有住, 记录refCount=1 之后再次创建就复用output, refCount++ 销毁之后refCount==0就释放底层output

type PeriodCompleteness

type PeriodCompleteness struct {
	Valid  bool
	TS     int64
	OK     bool
	Target map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL