Documentation ¶
Index ¶
- Constants
- type CompressionStrategy
- type Compressor
- type Config
- type HTTP
- func (h *HTTP) HandleNewDecoratedEvent(ctx context.Context, event *xatu.DecoratedEvent) error
- func (h *HTTP) HandleNewDecoratedEvents(ctx context.Context, events []*xatu.DecoratedEvent) error
- func (h *HTTP) Name() string
- func (h *HTTP) Start(ctx context.Context) error
- func (h *HTTP) Stop(ctx context.Context) error
- func (h *HTTP) Type() string
- type ItemExporter
Constants ¶
View Source
const SinkType = "http"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressionStrategy ¶
type CompressionStrategy string
var ( CompressionStrategyNone CompressionStrategy = "none" CompressionStrategyGzip CompressionStrategy = "gzip" CompressionStrategyZstd CompressionStrategy = "zstd" CompressionStrategyZlib CompressionStrategy = "zlib" CompressionStrategySnappy CompressionStrategy = "snappy" )
type Compressor ¶ added in v0.0.178
type Compressor struct {
Strategy CompressionStrategy
}
func (*Compressor) AddHeaders ¶ added in v0.0.178
func (c *Compressor) AddHeaders(req *http.Request)
type Config ¶
type Config struct { Address string `yaml:"address"` Headers map[string]string `yaml:"headers"` 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"` Compression CompressionStrategy `yaml:"compression" default:"none"` KeepAlive *bool `yaml:"keepAlive" default:"true"` Workers int `yaml:"workers" default:"1"` }
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func New ¶
func New(name string, config *Config, log logrus.FieldLogger, filterConfig *xatu.EventFilterConfig, shippingMethod processor.ShippingMethod) (*HTTP, error)
func (*HTTP) HandleNewDecoratedEvent ¶
func (*HTTP) HandleNewDecoratedEvents ¶
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 []*xatu.DecoratedEvent) error
Click to show internal directories.
Click to hide internal directories.