sinks

package
v0.0.0-...-34f9cc7 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventSinkInterface

type EventSinkInterface interface {
	Insert(obj interface{})
	Update(obj interface{})
	ExportNodeEvents(event watch.Event)
}

EventSinkInterface is the interface used to shunt events

func ManufactureSink

func ManufactureSink() (e EventSinkInterface)

ManufactureSink will manufacture a sinks according to viper configs TODO: Determine if it should return an array of sinks

func NewGlogSink

func NewGlogSink() EventSinkInterface

NewGlogSink will create a new

func NewMysqlSink

func NewMysqlSink(cfg MysqlConfig) (EventSinkInterface, error)

Returns a thread-safe implementation of EventSinkInterface for InfluxDB.

type GlogSink

type GlogSink struct {
}

GlogSink is the most basic sink Useful when you already have ELK/EFK Stack

func (*GlogSink) ExportNodeEvents

func (gs *GlogSink) ExportNodeEvents(event watch.Event)

UpdateEvents implements the EventSinkInterface

func (*GlogSink) Insert

func (gs *GlogSink) Insert(obj interface{})

UpdateEvents implements the EventSinkInterface

func (*GlogSink) Update

func (gs *GlogSink) Update(obj interface{})

UpdateEvents implements the EventSinkInterface

type MysqlConfig

type MysqlConfig struct {
	ClusterName     string
	User            string
	Password        string
	Host            string
	Port            int
	DbName          string
	ConnMaxLifetime time.Duration
	MaxOpenConns    int
	MaxIdleConns    int
	Secure          bool
}

type MysqlSink

type MysqlSink struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*MysqlSink) ExportNodeEvents

func (sink *MysqlSink) ExportNodeEvents(event watch.Event)

UpdateEvents implements the EventSinkInterface

func (*MysqlSink) Insert

func (sink *MysqlSink) Insert(obj interface{})

func (*MysqlSink) Update

func (sink *MysqlSink) Update(obj interface{})

Jump to

Keyboard shortcuts

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