Documentation ¶
Index ¶
- func CreateIndex(nshards uint, nreplicas uint, checkStartup bool, refreshInterval time.Duration) error
- func GetClient(config conf.ElasticDestConfig, httpClient *http.Client, logger log15.Logger) (c *elastic.Client, err error)
- type AnyField
- type DateField
- type DynamicTemplate
- type ESLogger
- type LongField
- type Mappings
- type MessageFields
- type MessageType
- type Opts
- type Settings
- type ShardSettings
- type StrField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndex ¶
Types ¶
type DateField ¶
type DateField struct { Typ string `json:"type"` Format string `json:"format"` Store bool `json:"store"` }
func NewDateField ¶
func NewDateField() DateField
type DynamicTemplate ¶
type DynamicTemplate struct { MatchMappingType string `json:"match_mapping_type,omitempty"` Match string `json:"match,omitempty"` Mapping AnyField `json:"mapping"` }
func DynamicBytes ¶
func DynamicBytes() DynamicTemplate
func DynamicDatetime ¶
func DynamicDatetime() DynamicTemplate
func DynamicNanoSeconds ¶
func DynamicNanoSeconds() DynamicTemplate
func DynamicPID ¶
func DynamicPID() DynamicTemplate
func StringsAsKeywords ¶
func StringsAsKeywords() DynamicTemplate
type LongField ¶
func NewLongField ¶
func NewLongField() LongField
type Mappings ¶
type Mappings struct {
Mtyp MessageType `json:"syslogmsg"`
}
func NewMappings ¶
func NewMappings() Mappings
type MessageFields ¶
type MessageFields struct { Facility StrField `json:"facility"` Severity StrField `json:"severity"` Hostname StrField `json:"keyword"` Appname StrField `json:"appname"` Procid StrField `json:"procid"` Msgid StrField `json:"msgid"` Message StrField `json:"message"` Treported DateField `json:"timereported"` Tgenerated DateField `json:"timegenerated"` }
func NewMessageFields ¶
func NewMessageFields() MessageFields
type MessageType ¶
type MessageType struct { Properties MessageFields `json:"properties"` DynamicTemplates [](map[string]DynamicTemplate) `json:"dynamic_templates"` }
type Settings ¶
type Settings struct { Shards uint `json:"number_of_shards"` Replicas uint `json:"number_of_replicas"` Shard ShardSettings `json:"shard"` Refresh string `json:"refresh_interval"` }
type ShardSettings ¶
type ShardSettings struct {
Check bool `json:"check_on_startup"`
}
type StrField ¶
func NewKeyword ¶
func NewKeyword() StrField
func NewTextField ¶
func NewTextField() StrField
Click to show internal directories.
Click to hide internal directories.