xatu

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const SinkType = "xatu"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address            string            `yaml:"address"`
	Headers            map[string]string `yaml:"headers"`
	TLS                bool              `yaml:"tls" default:"false"`
	MaxQueueSize       int               `yaml:"maxQueueSize" default:"51200"`
	BatchTimeout       time.Duration     `yaml:"batchTimeout" default:"5s"`
	ExportTimeout      time.Duration     `yaml:"exportTimeout" default:"30s"`
	MaxExportBatchSize int               `yaml:"maxExportBatchSize" default:"512"`
	Workers            int               `yaml:"workers" default:"1"`
	Retry              RetryConfig       `yaml:"retry"`
	KeepAlive          KeepAliveConfig   `yaml:"keepAlive"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ItemExporter

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

func NewItemExporter

func NewItemExporter(name string, config *Config, log logrus.FieldLogger) (ItemExporter, error)

func (ItemExporter) ExportItems

func (e ItemExporter) ExportItems(ctx context.Context, items []*pb.DecoratedEvent) error

func (ItemExporter) Shutdown

func (e ItemExporter) Shutdown(ctx context.Context) error

type KeepAliveConfig added in v0.0.198

type KeepAliveConfig struct {
	Enabled *bool         `yaml:"enabled" default:"true"`
	Time    time.Duration `yaml:"time" default:"150s"`
	Timeout time.Duration `yaml:"timeout" default:"30s"`
}

type RetryConfig added in v0.0.158

type RetryConfig struct {
	Enabled     bool          `yaml:"enabled" default:"true"`
	Scalar      time.Duration `yaml:"scalar" default:"0.5s"`
	MaxAttempts int           `yaml:"maxAttempts" default:"3"`
}

type Xatu

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

func New

func New(name string, config *Config, log logrus.FieldLogger, filterConfig *xatu.EventFilterConfig, shippingMethod processor.ShippingMethod) (*Xatu, error)

func (*Xatu) HandleNewDecoratedEvent

func (h *Xatu) HandleNewDecoratedEvent(ctx context.Context, event *xatu.DecoratedEvent) error

func (*Xatu) HandleNewDecoratedEvents

func (h *Xatu) HandleNewDecoratedEvents(ctx context.Context, events []*xatu.DecoratedEvent) error

func (*Xatu) Name

func (h *Xatu) Name() string

func (*Xatu) SetAuthorization added in v0.0.200

func (h *Xatu) SetAuthorization(val string)

func (*Xatu) Start

func (h *Xatu) Start(ctx context.Context) error

func (*Xatu) Stop

func (h *Xatu) Stop(ctx context.Context) error

func (*Xatu) Type

func (h *Xatu) Type() string

Jump to

Keyboard shortcuts

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