timeline

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Host string
	Port int
}

Backend - the destiny opentsdb backend

type HTTPTransport

type HTTPTransport struct {
	Transport
	// contains filtered or unexported fields
}

HTTPTransport - implements the HTTP transport

func NewHTTPTransport

func NewHTTPTransport(configuration *HTTPTransportConfig, logger *zap.Logger) (*HTTPTransport, error)

NewHTTPTransport - creates a new HTTP event manager

func (*HTTPTransport) Close

func (t *HTTPTransport) Close()

Close - closes the transport

func (*HTTPTransport) ConfigureBackend

func (t *HTTPTransport) ConfigureBackend(backend *Backend) error

ConfigureBackend - configures the backend

func (*HTTPTransport) PointChannel

func (t *HTTPTransport) PointChannel() chan<- interface{}

PointChannel - send a new point

type HTTPTransportConfig

type HTTPTransportConfig struct {
	BufferSize             int
	BatchSendInterval      string
	ServiceEndpoint        string
	Method                 string
	RequestTimeout         string
	ExpectedResponseStatus int
}

HTTPTransportConfig - has all HTTP event manager configurations

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager - the parent of all event managers

func NewManager

func NewManager(transport Transport, backend *Backend, defaultTags map[string]string) (*Manager, error)

NewManager - creates a timeline manager

func (*Manager) SendNumberPoint

func (m *Manager) SendNumberPoint(point *NumberPoint) error

SendNumberPoint - sends a number point

func (*Manager) SendTextPoint

func (m *Manager) SendTextPoint(point *TextPoint) error

SendTextPoint - sends a text point

func (*Manager) Shutdown

func (m *Manager) Shutdown()

Shutdown - shuts down the transport

type NumberPoint

type NumberPoint struct {
	Point
	Value float64 `json:"value"`
}

NumberPoint - a point with number type value

type Point

type Point struct {
	Metric    string            `json:"metric"`
	Tags      map[string]string `json:"tags"`
	Timestamp int64             `json:"timestamp"`
}

Point - the base point

type TextPoint

type TextPoint struct {
	Point
	Text string `json:"text"`
}

TextPoint - a point with text type value

type Transport

type Transport interface {

	// Send - send a new point
	PointChannel() chan<- interface{}

	// ConfigureBackend - configures the backend
	ConfigureBackend(backend *Backend) error

	// Close - closes this transport
	Close()
}

Transport - the implementation type to send a event

Jump to

Keyboard shortcuts

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