pumps

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MPL-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogzioPumpPrefix = "logzio-pump"
	LogzioPumpName   = "Logzio Pump"
)
View Source
const (
	KiB = 1 << (10 * iota)
	MiB
	GiB
	TiB
)

Variables

View Source
var AvailablePumps map[string]Pump
View Source
var COMMON_TAGS_COUNT = 5
View Source
var THRESHOLD_LEN_TAG_LIST = 1000

Functions

func NewLogzioClient

func NewLogzioClient(conf *LogzioPumpConfig) (*lg.LogzioSender, error)

Types

type BaseMongoConf added in v0.8.5

type BaseMongoConf struct {
	MongoURL                      string    `json:"mongo_url" mapstructure:"mongo_url"`
	MongoUseSSL                   bool      `json:"mongo_use_ssl" mapstructure:"mongo_use_ssl"`
	MongoSSLInsecureSkipVerify    bool      `json:"mongo_ssl_insecure_skip_verify" mapstructure:"mongo_ssl_insecure_skip_verify"`
	MongoSSLAllowInvalidHostnames bool      `json:"mongo_ssl_allow_invalid_hostnames" mapstructure:"mongo_ssl_allow_invalid_hostnames"`
	MongoSSLCAFile                string    `json:"mongo_ssl_ca_file" mapstructure:"mongo_ssl_ca_file"`
	MongoSSLPEMKeyfile            string    `json:"mongo_ssl_pem_keyfile" mapstructure:"mongo_ssl_pem_keyfile"`
	MongoDBType                   MongoType `json:"mongo_db_type" mapstructure:"mongo_db_type"`
}

type CSVConf

type CSVConf struct {
	CSVDir string `mapstructure:"csv_dir"`
}

type CSVPump

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

func (*CSVPump) GetName

func (c *CSVPump) GetName() string

func (*CSVPump) GetTimeout added in v0.8.5

func (c *CSVPump) GetTimeout() int

func (*CSVPump) Init

func (c *CSVPump) Init(conf interface{}) error

func (*CSVPump) New

func (c *CSVPump) New() Pump

func (*CSVPump) SetTimeout added in v0.8.5

func (c *CSVPump) SetTimeout(timeout int)

func (*CSVPump) WriteData

func (c *CSVPump) WriteData(ctx context.Context, data []interface{}) error

type DogStatsdConf

type DogStatsdConf struct {
	Namespace            string  `mapstructure:"namespace"`
	Address              string  `mapstructure:"address"`
	SampleRate           float64 `mapstructure:"sample_rate"`
	AsyncUDS             bool    `mapstructure:"async_uds"`
	AsyncUDSWriteTimeout int     `mapstructure:"async_uds_write_timeout_seconds"`
	Buffered             bool    `mapstructure:"buffered"`
	BufferedMaxMessages  int     `mapstructure:"buffered_max_messages"`
}

type DogStatsdPump

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

func (*DogStatsdPump) GetName

func (s *DogStatsdPump) GetName() string

func (*DogStatsdPump) GetTimeout added in v0.8.5

func (s *DogStatsdPump) GetTimeout() int

func (*DogStatsdPump) Init

func (s *DogStatsdPump) Init(conf interface{}) error

func (*DogStatsdPump) New

func (s *DogStatsdPump) New() Pump

func (*DogStatsdPump) SetTimeout added in v0.8.5

func (s *DogStatsdPump) SetTimeout(timeout int)

func (*DogStatsdPump) WriteData

func (s *DogStatsdPump) WriteData(ctx context.Context, data []interface{}) error

type DummyPump

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

func (*DummyPump) GetName

func (p *DummyPump) GetName() string

func (*DummyPump) GetTimeout added in v0.8.5

func (p *DummyPump) GetTimeout() int

func (*DummyPump) Init

func (p *DummyPump) Init(conf interface{}) error

func (*DummyPump) New

func (p *DummyPump) New() Pump

func (*DummyPump) SetTimeout added in v0.8.5

func (p *DummyPump) SetTimeout(timeout int)

func (*DummyPump) WriteData

func (p *DummyPump) WriteData(ctx context.Context, data []interface{}) error

type Elasticsearch3Operator

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

type Elasticsearch5Operator

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

type Elasticsearch6Operator

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

type ElasticsearchBulkConfig added in v0.8.5

type ElasticsearchBulkConfig struct {
	Workers       int `mapstructure:"workers"`
	FlushInterval int `mapstructure:"flush_interval"`
	BulkActions   int `mapstructure:"bulk_actions"`
	BulkSize      int `mapstructure:"bulk_size"`
}

type ElasticsearchConf

type ElasticsearchConf struct {
	IndexName          string                  `mapstructure:"index_name"`
	ElasticsearchURL   string                  `mapstructure:"elasticsearch_url"`
	EnableSniffing     bool                    `mapstructure:"use_sniffing"`
	DocumentType       string                  `mapstructure:"document_type"`
	RollingIndex       bool                    `mapstructure:"rolling_index"`
	ExtendedStatistics bool                    `mapstructure:"extended_stats"`
	GenerateID         bool                    `mapstructure:"generate_id"`
	DecodeBase64       bool                    `mapstructure:"decode_base64"`
	Version            string                  `mapstructure:"version"`
	DisableBulk        bool                    `mapstructure:"disable_bulk"`
	BulkConfig         ElasticsearchBulkConfig `mapstructure:"bulk_config"`
}

type ElasticsearchOperator

type ElasticsearchOperator interface {
	// contains filtered or unexported methods
}

type ElasticsearchPump

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

func (*ElasticsearchPump) GetName

func (e *ElasticsearchPump) GetName() string

func (*ElasticsearchPump) GetTimeout added in v0.8.5

func (e *ElasticsearchPump) GetTimeout() int

func (*ElasticsearchPump) Init

func (e *ElasticsearchPump) Init(config interface{}) error

func (*ElasticsearchPump) New

func (e *ElasticsearchPump) New() Pump

func (*ElasticsearchPump) SetTimeout added in v0.8.5

func (e *ElasticsearchPump) SetTimeout(timeout int)

func (*ElasticsearchPump) WriteData

func (e *ElasticsearchPump) WriteData(ctx context.Context, data []interface{}) error

type GraylogConf

type GraylogConf struct {
	GraylogHost string   `mapstructure:"host"`
	GraylogPort int      `mapstructure:"port"`
	Tags        []string `mapstructure:"tags"`
}

type GraylogPump

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

func (*GraylogPump) GetName

func (p *GraylogPump) GetName() string

func (*GraylogPump) GetTimeout added in v0.8.5

func (p *GraylogPump) GetTimeout() int

func (*GraylogPump) Init

func (p *GraylogPump) Init(conf interface{}) error

func (*GraylogPump) New

func (p *GraylogPump) New() Pump

func (*GraylogPump) SetTimeout added in v0.8.5

func (p *GraylogPump) SetTimeout(timeout int)

func (*GraylogPump) WriteData

func (p *GraylogPump) WriteData(ctx context.Context, data []interface{}) error

type GroupLoginRequest

type GroupLoginRequest struct {
	UserKey string
	GroupID string
}

type HybridPump

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

HybridPump allows to send analytics to MDCB over RPC

func (*HybridPump) GetName

func (p *HybridPump) GetName() string

func (*HybridPump) GetTimeout added in v0.8.5

func (p *HybridPump) GetTimeout() int

func (*HybridPump) Init

func (p *HybridPump) Init(config interface{}) error

func (*HybridPump) New

func (p *HybridPump) New() Pump

func (*HybridPump) SetTimeout added in v0.8.5

func (p *HybridPump) SetTimeout(timeout int)

func (*HybridPump) WriteData

func (p *HybridPump) WriteData(ctx context.Context, data []interface{}) error

type InfluxConf

type InfluxConf struct {
	DatabaseName string   `mapstructure:"database_name"`
	Addr         string   `mapstructure:"address"`
	Username     string   `mapstructure:"username"`
	Password     string   `mapstructure:"password"`
	Fields       []string `mapstructure:"fields"`
	Tags         []string `mapstructure:"tags"`
}

type InfluxPump

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

func (*InfluxPump) GetName

func (i *InfluxPump) GetName() string

func (*InfluxPump) GetTimeout added in v0.8.5

func (i *InfluxPump) GetTimeout() int

func (*InfluxPump) Init

func (i *InfluxPump) Init(config interface{}) error

func (*InfluxPump) New

func (i *InfluxPump) New() Pump

func (*InfluxPump) SetTimeout added in v0.8.5

func (i *InfluxPump) SetTimeout(timeout int)

func (*InfluxPump) WriteData

func (i *InfluxPump) WriteData(ctx context.Context, data []interface{}) error

type Json

type Json map[string]interface{}

type KafkaConf

type KafkaConf struct {
	Broker                []string          `mapstructure:"broker"`
	ClientId              string            `mapstructure:"client_id"`
	Topic                 string            `mapstructure:"topic"`
	Timeout               time.Duration     `mapstructure:"timeout"`
	Compressed            bool              `mapstructure:"compressed"`
	MetaData              map[string]string `mapstructure:"meta_data"`
	UseSSL                bool              `mapstructure:"use_ssl"`
	SSLInsecureSkipVerify bool              `mapstructure:"ssl_insecure_skip_verify"`
}

type KafkaPump

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

func (*KafkaPump) GetName

func (k *KafkaPump) GetName() string

func (*KafkaPump) GetTimeout added in v0.8.5

func (k *KafkaPump) GetTimeout() int

func (*KafkaPump) Init

func (k *KafkaPump) Init(config interface{}) error

func (*KafkaPump) New

func (k *KafkaPump) New() Pump

func (*KafkaPump) SetTimeout added in v0.8.5

func (k *KafkaPump) SetTimeout(timeout int)

func (*KafkaPump) WriteData

func (k *KafkaPump) WriteData(ctx context.Context, data []interface{}) error

type LogzioPump

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

func (*LogzioPump) GetName

func (p *LogzioPump) GetName() string

func (*LogzioPump) GetTimeout added in v0.8.5

func (p *LogzioPump) GetTimeout() int

func (*LogzioPump) Init

func (p *LogzioPump) Init(config interface{}) error

func (*LogzioPump) New

func (p *LogzioPump) New() Pump

func (*LogzioPump) SetTimeout added in v0.8.5

func (p *LogzioPump) SetTimeout(timeout int)

func (*LogzioPump) WriteData

func (p *LogzioPump) WriteData(ctx context.Context, data []interface{}) error

type LogzioPumpConfig

type LogzioPumpConfig struct {
	CheckDiskSpace bool   `mapstructure:"check_disk_space"`
	DiskThreshold  int    `mapstructure:"disk_threshold"`
	DrainDuration  string `mapstructure:"drain_duration"`
	QueueDir       string `mapstructure:"queue_dir"`
	Token          string `mapstructure:"token"`
	URL            string `mapstructure:"url"`
}

func NewLogzioPumpConfig

func NewLogzioPumpConfig() *LogzioPumpConfig

type MoesifConf

type MoesifConf struct {
	ApplicationId string `mapstructure:"application_id"`
}

type MoesifPump

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

func (*MoesifPump) GetName

func (p *MoesifPump) GetName() string

func (*MoesifPump) GetTimeout added in v0.8.5

func (p *MoesifPump) GetTimeout() int

func (*MoesifPump) Init

func (p *MoesifPump) Init(config interface{}) error

func (*MoesifPump) New

func (e *MoesifPump) New() Pump

func (*MoesifPump) SetTimeout added in v0.8.5

func (p *MoesifPump) SetTimeout(timeout int)

func (*MoesifPump) WriteData

func (p *MoesifPump) WriteData(ctx context.Context, data []interface{}) error

type MongoAggregateConf

type MongoAggregateConf struct {
	BaseMongoConf
	UseMixedCollection      bool     `mapstructure:"use_mixed_collection"`
	TrackAllPaths           bool     `mapstructure:"track_all_paths"`
	IgnoreTagPrefixList     []string `mapstructure:"ignore_tag_prefix_list"`
	ThresholdLenTagList     int      `mapstructure:"threshold_len_tag_list"`
	StoreAnalyticsPerMinute bool     `mapstructure:"store_analytics_per_minute"`
}

type MongoAggregatePump

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

func (*MongoAggregatePump) GetCollectionName

func (m *MongoAggregatePump) GetCollectionName(orgid string) (string, error)

func (*MongoAggregatePump) GetName

func (m *MongoAggregatePump) GetName() string

func (*MongoAggregatePump) GetTimeout added in v0.8.5

func (m *MongoAggregatePump) GetTimeout() int

func (*MongoAggregatePump) HandleWriteErr

func (m *MongoAggregatePump) HandleWriteErr(err error) error

func (*MongoAggregatePump) Init

func (m *MongoAggregatePump) Init(config interface{}) error

func (*MongoAggregatePump) New

func (m *MongoAggregatePump) New() Pump

func (*MongoAggregatePump) SetTimeout added in v0.8.5

func (m *MongoAggregatePump) SetTimeout(timeout int)

func (*MongoAggregatePump) WriteData

func (m *MongoAggregatePump) WriteData(ctx context.Context, data []interface{}) error

func (*MongoAggregatePump) WriteUptimeData

func (m *MongoAggregatePump) WriteUptimeData(data []interface{})

WriteUptimeData will pull the data from the in-memory store and drop it into the specified MongoDB collection

type MongoConf

type MongoConf struct {
	BaseMongoConf

	CollectionName            string `json:"collection_name" mapstructure:"collection_name"`
	MaxInsertBatchSizeBytes   int    `json:"max_insert_batch_size_bytes" mapstructure:"max_insert_batch_size_bytes"`
	MaxDocumentSizeBytes      int    `json:"max_document_size_bytes" mapstructure:"max_document_size_bytes"`
	CollectionCapMaxSizeBytes int    `json:"collection_cap_max_size_bytes" mapstructure:"collection_cap_max_size_bytes"`
	CollectionCapEnable       bool   `json:"collection_cap_enable" mapstructure:"collection_cap_enable"`
}

type MongoPump

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

func (*MongoPump) AccumulateSet

func (m *MongoPump) AccumulateSet(data []interface{}) [][]interface{}

func (*MongoPump) GetName

func (m *MongoPump) GetName() string

func (*MongoPump) GetTimeout added in v0.8.5

func (m *MongoPump) GetTimeout() int

func (*MongoPump) Init

func (m *MongoPump) Init(config interface{}) error

func (*MongoPump) New

func (m *MongoPump) New() Pump

func (*MongoPump) SetTimeout added in v0.8.5

func (m *MongoPump) SetTimeout(timeout int)

func (*MongoPump) WriteData

func (m *MongoPump) WriteData(ctx context.Context, data []interface{}) error

func (*MongoPump) WriteUptimeData

func (m *MongoPump) WriteUptimeData(data []interface{})

WriteUptimeData will pull the data from the in-memory store and drop it into the specified MongoDB collection

type MongoSelectiveConf

type MongoSelectiveConf struct {
	BaseMongoConf
	MaxInsertBatchSizeBytes int `mapstructure:"max_insert_batch_size_bytes"`
	MaxDocumentSizeBytes    int `mapstructure:"max_document_size_bytes"`
}

type MongoSelectivePump

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

func (*MongoSelectivePump) AccumulateSet

func (m *MongoSelectivePump) AccumulateSet(data []interface{}) [][]interface{}

func (*MongoSelectivePump) GetCollectionName

func (m *MongoSelectivePump) GetCollectionName(orgid string) (string, error)

func (*MongoSelectivePump) GetName

func (m *MongoSelectivePump) GetName() string

func (*MongoSelectivePump) GetTimeout added in v0.8.5

func (m *MongoSelectivePump) GetTimeout() int

func (*MongoSelectivePump) Init

func (m *MongoSelectivePump) Init(config interface{}) error

func (*MongoSelectivePump) New

func (m *MongoSelectivePump) New() Pump

func (*MongoSelectivePump) SetTimeout added in v0.8.5

func (m *MongoSelectivePump) SetTimeout(timeout int)

func (*MongoSelectivePump) WriteData

func (m *MongoSelectivePump) WriteData(ctx context.Context, data []interface{}) error

func (*MongoSelectivePump) WriteUptimeData

func (m *MongoSelectivePump) WriteUptimeData(data []interface{})

WriteUptimeData will pull the data from the in-memory store and drop it into the specified MongoDB collection

type MongoType added in v0.8.5

type MongoType int
const (
	StandardMongo MongoType = iota
	AWSDocumentDB
)

type PrometheusConf

type PrometheusConf struct {
	Addr string `mapstructure:"listen_address"`
	Path string `mapstructure:"path"`
}

type PrometheusPump

type PrometheusPump struct {

	// Per service
	TotalStatusMetrics  *prometheus.CounterVec
	PathStatusMetrics   *prometheus.CounterVec
	KeyStatusMetrics    *prometheus.CounterVec
	OauthStatusMetrics  *prometheus.CounterVec
	TotalLatencyMetrics *prometheus.HistogramVec
	// contains filtered or unexported fields
}

func (*PrometheusPump) GetName

func (p *PrometheusPump) GetName() string

func (*PrometheusPump) GetTimeout added in v0.8.5

func (p *PrometheusPump) GetTimeout() int

func (*PrometheusPump) Init

func (p *PrometheusPump) Init(conf interface{}) error

func (*PrometheusPump) New

func (p *PrometheusPump) New() Pump

func (*PrometheusPump) SetTimeout added in v0.8.5

func (p *PrometheusPump) SetTimeout(timeout int)

func (*PrometheusPump) WriteData

func (p *PrometheusPump) WriteData(ctx context.Context, data []interface{}) error

type Pump

type Pump interface {
	GetName() string
	New() Pump
	Init(interface{}) error
	WriteData(context.Context, []interface{}) error
	SetTimeout(timeout int)
	GetTimeout() int
}

func GetPumpByName

func GetPumpByName(name string) (Pump, error)

type RawDecoded

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

type SegmentConf

type SegmentConf struct {
	WriteKey string `mapstructure:"segment_write_key"`
}

type SegmentPump

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

func (*SegmentPump) GetName

func (s *SegmentPump) GetName() string

func (*SegmentPump) GetTimeout added in v0.8.5

func (s *SegmentPump) GetTimeout() int

func (*SegmentPump) Init

func (s *SegmentPump) Init(config interface{}) error

func (*SegmentPump) New

func (s *SegmentPump) New() Pump

func (*SegmentPump) SetTimeout added in v0.8.5

func (s *SegmentPump) SetTimeout(timeout int)

func (*SegmentPump) ToJSONMap

func (s *SegmentPump) ToJSONMap(obj interface{}) (map[string]interface{}, error)

func (*SegmentPump) WriteData

func (s *SegmentPump) WriteData(ctx context.Context, data []interface{}) error

func (*SegmentPump) WriteDataRecord

func (s *SegmentPump) WriteDataRecord(record analytics.AnalyticsRecord) error

type SplunkClient

type SplunkClient struct {
	Token         string
	CollectorURL  string
	TLSSkipVerify bool
	// contains filtered or unexported fields
}

SplunkClient contains Splunk client methods.

func NewSplunkClient

func NewSplunkClient(token string, collectorURL string, skipVerify bool, certFile string, keyFile string, serverName string) (c *SplunkClient, err error)

NewSplunkClient initializes a new SplunkClient.

func (*SplunkClient) Send

func (c *SplunkClient) Send(ctx context.Context, event map[string]interface{}, ts time.Time) (*http.Response, error)

Send sends an event to the Splunk HTTP Event Collector interface.

type SplunkPump

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

SplunkPump is a Tyk Pump driver for Splunk.

func (*SplunkPump) GetName

func (p *SplunkPump) GetName() string

GetName returns the pump name.

func (*SplunkPump) GetTimeout added in v0.8.5

func (s *SplunkPump) GetTimeout() int

func (*SplunkPump) Init

func (p *SplunkPump) Init(config interface{}) error

Init performs the initialization of the SplunkClient.

func (*SplunkPump) New

func (p *SplunkPump) New() Pump

New initializes a new pump.

func (*SplunkPump) SetTimeout added in v0.8.5

func (s *SplunkPump) SetTimeout(timeout int)

func (*SplunkPump) WriteData

func (p *SplunkPump) WriteData(ctx context.Context, data []interface{}) error

WriteData prepares an appropriate data structure and sends it to the HTTP Event Collector.

type SplunkPumpConfig

type SplunkPumpConfig struct {
	CollectorToken        string `mapstructure:"collector_token"`
	CollectorURL          string `mapstructure:"collector_url"`
	SSLInsecureSkipVerify bool   `mapstructure:"ssl_insecure_skip_verify"`
	SSLCertFile           string `mapstructure:"ssl_cert_file"`
	SSLKeyFile            string `mapstructure:"ssl_key_file"`
	SSLServerName         string `mapstructure:"ssl_server_name"`
}

SplunkPumpConfig contains the driver configuration parameters.

type StatsdConf

type StatsdConf struct {
	Address string   `mapstructure:"address"`
	Fields  []string `mapstructure:"fields"`
	Tags    []string `mapstructure:"tags"`
}

type StatsdPump

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

func (*StatsdPump) GetName

func (s *StatsdPump) GetName() string

func (*StatsdPump) GetTimeout added in v0.8.5

func (s *StatsdPump) GetTimeout() int

func (*StatsdPump) Init

func (s *StatsdPump) Init(config interface{}) error

func (*StatsdPump) New

func (s *StatsdPump) New() Pump

func (*StatsdPump) SetTimeout added in v0.8.5

func (s *StatsdPump) SetTimeout(timeout int)

func (*StatsdPump) WriteData

func (s *StatsdPump) WriteData(ctx context.Context, data []interface{}) error

Jump to

Keyboard shortcuts

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