Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
Production bool `yaml:"production"`
ListenAddr string `yaml:"listen_addr"`
}
func GetConfigApplication ¶
func GetConfigApplication() Application
GetConfigApplication @autowire(set=config)
type Backend ¶
type Backend struct {
Name string `yaml:"name"`
Enabled bool `yaml:"enabled"`
Type string `yaml:"type"`
Addr string `yaml:"addr"`
Auth Auth `yaml:"auth"`
Timeout int64 `yaml:"timeout"` // 请求超时时间(毫秒)
MultiSearch map[string]MultiSearch `yaml:"multi_search"` // 多索引/日志存储查询
BuildInQueries map[string]BuildInQuery `yaml:"build_in_queries"` // 内置的快捷查询
TimeField map[string]string `yaml:"time_field"` // 时间排序字段,ES默认为@timestamp。
Timezone map[string]string `yaml:"timezone"` // 时区
DefaultFields map[string][]string `yaml:"default_fields"` // 默认查询字段
SortFields map[string][]SortField `yaml:"sort_fields"` // 字段排序
ParserLogType string `yaml:"parser_log_type"` // 日志类型解析器
ParserFields ParserFields `yaml:"parser_fields"` // 字段解析器
}
type BackendList ¶
type BackendList []Backend
func GetConfigBackendList ¶
func GetConfigBackendList() BackendList
GetConfigBackendList @autowire(set=config)
func (*BackendList) Default ¶
func (s *BackendList) Default()
func (*BackendList) Match ¶
func (s *BackendList) Match(name string) Backend
type BuildInQuery ¶
type BuildInQuery struct {
Must BuildInQueryEntrySlice `yaml:"must"`
MustNot BuildInQueryEntrySlice `yaml:"must_not"`
Or BuildInQueryEntrySlice `yaml:"or"`
}
type BuildInQueryEntry ¶
type BuildInQueryEntrySlice ¶
type BuildInQueryEntrySlice []BuildInQueryEntry
func (*BuildInQueryEntrySlice) FieldConditions ¶
func (s *BuildInQueryEntrySlice) FieldConditions(fn func(field string, conditions []string) bool)
type Config ¶
type Config struct {
Application Application `yaml:"application"`
QQWry QQWry `yaml:"qq_wry"`
BackendList BackendList `yaml:"backend_list"`
}
type Loader ¶
type Loader interface {
Load(config LoaderConfig, dst *Config) (err error)
}
var (
DefaultLoader Loader = &localFileLoader{}
)
type LoaderConfig ¶
type MultiSearch ¶
type MultiSearchSlice ¶
type MultiSearchSlice []MultiSearch
func (MultiSearchSlice) Len ¶
func (s MultiSearchSlice) Len() int
func (MultiSearchSlice) Less ¶
func (s MultiSearchSlice) Less(i, j int) bool
func (MultiSearchSlice) Swap ¶
func (s MultiSearchSlice) Swap(i, j int)
type ParserField ¶
type ParserField struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
FromFields []string `yaml:"from_field"`
ToField string `yaml:"to_field"`
TrimSet string `yaml:"trim_set"`
LuaField string `yaml:"lua_field"`
LuaReturn string `yaml:"lua_return"`
}
func (*ParserField) Default ¶
func (s *ParserField) Default()
type ParserFields ¶
type ParserFields struct {
AccessLog []ParserField `yaml:"access_log"`
JsonLog []ParserField `yaml:"json_log"`
StringLog []ParserField `yaml:"string_log"`
}
func (*ParserFields) Default ¶
func (s *ParserFields) Default()
Click to show internal directories.
Click to hide internal directories.