replay

package
v0.0.0-...-d66e16b Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplayInfluxLog

func ReplayInfluxLog(fpath string, interval time.Duration, player Replayer) int

Types

type Replayer

type Replayer func(messageData []byte) error

type WebSocket

type WebSocket struct {
	URL            string            `toml:"url"`
	ConnectTimeout time.Duration     `toml:"connect_timeout"`
	WriteTimeout   time.Duration     `toml:"write_timeout"`
	ReadTimeout    time.Duration     `toml:"read_timeout"`
	Headers        map[string]string `toml:"headers"`
	UseTextFrames  bool              `toml:"use_text_frames"`
	// contains filtered or unexported fields
}

WebSocket can output to WebSocket endpoint. This is a direct copy of the telegraf websocket output plugin

func NewWebSocket

func NewWebSocket(url string) *WebSocket

func (*WebSocket) Close

func (w *WebSocket) Close() error

Close closes the connection. Noop if already closed.

func (*WebSocket) Connect

func (w *WebSocket) Connect() error

Connect to the output endpoint.

func (*WebSocket) Write

func (w *WebSocket) Write(messageData []byte) error

Write writes the given metrics to the destination. Not thread-safe.

Jump to

Keyboard shortcuts

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