68 lines
2.0 KiB
Go
68 lines
2.0 KiB
Go
// Unless explicitly stated otherwise all files in this repository are licensed
|
|
// under the Apache License Version 2.0.
|
|
// This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
// Copyright 2016-present Datadog, Inc.
|
|
|
|
package logs
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// EPIntakeVersion is the events platform intake API version
|
|
type EPIntakeVersion uint8
|
|
|
|
// IntakeTrackType indicates the type of an endpoint intake.
|
|
type IntakeTrackType string
|
|
|
|
// IntakeProtocol indicates the protocol to use for an endpoint intake.
|
|
type IntakeProtocol string
|
|
|
|
// IntakeOrigin indicates the log source to use for an endpoint intake.
|
|
type IntakeOrigin string
|
|
|
|
const (
|
|
_ EPIntakeVersion = iota
|
|
// EPIntakeVersion1 is version 1 of the envets platform intake API
|
|
EPIntakeVersion1
|
|
// EPIntakeVersion2 is version 2 of the envets platform intake API
|
|
EPIntakeVersion2
|
|
)
|
|
|
|
// Endpoint holds all the organization and network parameters to send logs
|
|
type Endpoint struct {
|
|
APIKey string `mapstructure:"api_key" json:"api_key"`
|
|
Addr string
|
|
Topic string
|
|
Host string
|
|
Port int
|
|
UseSSL bool
|
|
UseCompression bool `mapstructure:"use_compression" json:"use_compression"`
|
|
CompressionLevel int `mapstructure:"compression_level" json:"compression_level"`
|
|
ProxyAddress string
|
|
ConnectionResetInterval time.Duration
|
|
|
|
BackoffFactor float64
|
|
BackoffBase float64
|
|
BackoffMax float64
|
|
RecoveryInterval int
|
|
RecoveryReset bool
|
|
|
|
Version EPIntakeVersion
|
|
TrackType IntakeTrackType
|
|
Protocol IntakeProtocol
|
|
Origin IntakeOrigin
|
|
}
|
|
|
|
// Endpoints holds the main endpoint and additional ones to dualship logs.
|
|
type Endpoints struct {
|
|
Main Endpoint
|
|
Additionals []Endpoint
|
|
UseProto bool
|
|
Type string
|
|
BatchWait time.Duration
|
|
BatchMaxConcurrentSend int
|
|
BatchMaxSize int
|
|
BatchMaxContentSize int
|
|
}
|