output

package
v0.20.15 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TimeLayout = "2006-01-02T15:04:05.000Z"

Variables

This section is empty.

Functions

This section is empty.

Types

type InputMessage

type InputMessage struct {
	// time format TsLayout = "2006-01-02T15:04:05.000Z"
	Timestamp  string      `json:"@timestamp"`
	DataID     int         `json:"dataid"`
	ObjMeta    MessageMeta `json:"objmeta"`
	Prometheus interface{} `json:"prometheus,omitempty"`
	Data       interface{} `json:"data,omitempty"`
}

type Message

type Message struct {
	Meta   MessageMeta `json:"meta"` // pod meta define
	DataID int
	Data   []byte
}

Message will be sent to net

type MessageMeta

type MessageMeta struct {
	btypes.ObjectMeta

	IP string `json:"ip"`
}

type Output

type Output interface {
	Input(msg *InputMessage) error
}

Output output interface

func New

func New(ctx context.Context, cfg *config.Config) (Output, error)

New create a new Output object

Jump to

Keyboard shortcuts

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