Documentation
¶
Index ¶
- Constants
- type Admin
- type AdminOptions
- type ApiToRateLimiters
- type AsyncSearch
- type AsyncSearchOptions
- type Auth
- type AuthOptions
- type Backoff
- type CHClient
- type CORS
- type Cache
- type Clients
- type Config
- type DB
- type Debug
- type DownloadParams
- type ErrorGroups
- type ErrorGroupsOptions
- type Field
- type FieldFilter
- type FieldFilterSet
- type FileStore
- type GRPC
- type GRPCParams
- type HTTP
- type HandlerCache
- type Handlers
- type Inmemory
- type JWT
- type KeepaliveParams
- type LogTagsMapping
- type Mask
- type Masking
- type MassExport
- type MassExportOptions
- type OIDC
- type RateLimiter
- type RateLimiters
- type RateLimiting
- type Redis
- type S3
- type SeqAPI
- type SeqAPICaches
- type SeqAPILimits
- type SeqAPIOptions
- type SeqDBClient
- type Server
- type SessionStore
- type TLS
Constants ¶
View Source
const ( MaxHTTPHeaderBytes = 1 << 12 // 4 KiB DefaultSeqDBClientID = "default_seq_db" DefaultCHClientID = "default_ch" DefaultInmemID = "default_inmem" DefaultRedisWithInmemID = "default_redis_with_inmem" DefaultRedisWithoutInmemID = "default_redis_without_inmem" DefaultMassExportRedisID = "default_mass_export_redis" SeqDBClientModeGRPC = "grpc" MaskModeMask = "mask" MaskModeReplace = "replace" MaskModeCut = "cut" FieldFilterConditionAnd = "and" FieldFilterConditionOr = "or" FieldFilterConditionNot = "not" FieldFilterModeEqual = "equal" FieldFilterModeContains = "contains" FieldFilterModePrefix = "prefix" FieldFilterModeSuffix = "suffix" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
Options AdminOptions `yaml:"options"`
Envs map[string]*AdminOptions `yaml:"envs,omitempty"`
DefaultEnv string `yaml:"default_env,omitempty"`
}
type AdminOptions ¶
type AdminOptions struct {
SuperUsers []string `yaml:"super_users,omitempty"`
Cache *HandlerCache `yaml:"cache,omitempty"`
}
type ApiToRateLimiters ¶
type ApiToRateLimiters map[string]RateLimiters
type AsyncSearch ¶
type AsyncSearch struct {
Options AsyncSearchOptions `yaml:"options"`
Envs map[string]*AsyncSearchOptions `yaml:"envs,omitempty"`
DefaultEnv string `yaml:"default_env,omitempty"`
}
type AsyncSearchOptions ¶
type Auth ¶
type Auth struct {
Options AuthOptions `yaml:"options"`
Envs map[string]AuthOptions `yaml:"envs,omitempty"`
}
type AuthOptions ¶
type CHClient ¶
type CHClient struct {
Addrs []string `yaml:"addrs"`
Database string `yaml:"database,omitempty"`
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
Sharded bool `yaml:"sharded,omitempty"`
DialTimeout time.Duration `yaml:"dial_timeout,omitempty"`
ReadTimeout time.Duration `yaml:"read_timeout,omitempty"`
}
type CORS ¶
type CORS struct {
AllowedOrigins []string `yaml:"allowed_origins,omitempty"`
AllowedMethods []string `yaml:"allowed_methods,omitempty"`
AllowedHeaders []string `yaml:"allowed_headers,omitempty"`
ExposedHeaders []string `yaml:"exposed_headers,omitempty"`
MaxAge int `yaml:"max_age,omitempty"`
AllowCredentials bool `yaml:"allow_credentials,omitempty"`
OptionsPassthrough bool `yaml:"options_passthrough,omitempty"`
}
type Clients ¶
type Clients struct {
SeqDB map[string]*SeqDBClient `yaml:"seq_db"`
ClickHouse map[string]*CHClient `yaml:"clickhouse,omitempty"`
}
type Config ¶
type DB ¶
type DB struct {
Name string `yaml:"name"`
Host string `yaml:"host"`
Port int64 `yaml:"port"`
User string `yaml:"user"`
Pass string `yaml:"pass"`
RequestTimeout time.Duration `yaml:"request_timeout"`
ConnectionPoolCapacity int64 `yaml:"connection_pool_capacity"`
UsePreparedStatements *bool `yaml:"use_prepared_statements,omitempty"`
}
func (*DB) ConnString ¶
type DownloadParams ¶
type ErrorGroups ¶
type ErrorGroups struct {
Options ErrorGroupsOptions `yaml:"options"`
Envs map[string]*ErrorGroupsOptions `yaml:"envs,omitempty"`
DefaultEnv string `yaml:"default_env,omitempty"`
}
type ErrorGroupsOptions ¶
type ErrorGroupsOptions struct {
CHID string `yaml:"ch_id,omitempty"`
LogTagsMapping LogTagsMapping `yaml:"log_tags_mapping"`
QueryFilter map[string]string `yaml:"query_filter,omitempty"`
}
type FieldFilter ¶
type FieldFilterSet ¶
type FieldFilterSet struct {
Condition string `yaml:"condition"` // "and" or "or" or "not"
Filters []FieldFilter `yaml:"filters"` // max 1 if condition:not
}
type GRPCParams ¶
type GRPCParams struct {
Keepalive *KeepaliveParams `yaml:"keepalive,omitempty"`
}
type HandlerCache ¶
type Handlers ¶
type Handlers struct {
SeqAPI SeqAPI `yaml:"seq_api"`
MassExport *MassExport `yaml:"mass_export,omitempty"`
AsyncSearch *AsyncSearch `yaml:"async_search,omitempty"`
ErrorGroups *ErrorGroups `yaml:"error_groups,omitempty"`
Admin *Admin `yaml:"admin,omitempty"`
}
type KeepaliveParams ¶
type KeepaliveParams struct {
// After a duration of this time if the client doesn't see any activity it
// pings the server to see if the transport is still alive.
// If set below 10s, a minimum value of 10s will be used instead.
Time time.Duration `yaml:"time,omitempty"`
// After having pinged for keepalive check, the client waits for a duration
// of Timeout and if no activity is seen even after that the connection is
// closed. If set below 1s, a minimum value of 1s will be used instead.
Timeout time.Duration `yaml:"timeout,omitempty"`
// If true, client sends keepalive pings even with no active RPCs. If false,
// when there are no active RPCs, Time and Timeout will be ignored and no
// keepalive pings will be sent. False by default.
PermitWithoutStream bool `yaml:"permit_without_stream,omitempty"`
}
type LogTagsMapping ¶
type Mask ¶
type Mask struct {
Re string `yaml:"re"`
Groups []int `yaml:"groups,omitempty"`
Mode string `yaml:"mode"` // "mask" or "replace" or "cut"
ReplaceWord string `yaml:"replace_word,omitempty"` // for mode:replace
ProcessFields []string `yaml:"process_fields,omitempty"`
IgnoreFields []string `yaml:"ignore_fields,omitempty"`
FieldFilters *FieldFilterSet `yaml:"field_filters,omitempty"`
}
type MassExport ¶
type MassExport struct {
Options MassExportOptions `yaml:"options"`
Envs map[string]*MassExportOptions `yaml:"envs,omitempty"`
DefaultEnv string `yaml:"default_env,omitempty"`
}
type MassExportOptions ¶
type MassExportOptions struct {
SeqDBID string `yaml:"seq_db_id,omitempty"`
WorkersCount int `yaml:"workers_count"`
TasksChannelSize int `yaml:"tasks_channel_size,omitempty"`
PartLength time.Duration `yaml:"part_length,omitempty"`
URLPrefix string `yaml:"url_prefix"`
AllowedUsers []string `yaml:"allowed_users,omitempty"`
FileStore FileStore `yaml:"file_store"`
SessionStore SessionStore `yaml:"session_store"`
DownloadParams DownloadParams `yaml:"download_params,omitempty"`
}
type RateLimiter ¶
type RateLimiters ¶
type RateLimiters struct {
Default RateLimiter `yaml:"default"`
SpecialUsers map[string]RateLimiter `yaml:"spec_users,omitempty"`
}
type RateLimiting ¶
type RateLimiting struct {
// rl options are optional, without them requests not covered by envs are not limited.
Options ApiToRateLimiters `yaml:"options,omitempty"`
Envs map[string]ApiToRateLimiters `yaml:"envs,omitempty"`
}
type Redis ¶
type Redis struct {
WithInmemID string `yaml:"with_inmem_id,omitempty"`
KeyPrefix string `yaml:"key_prefix,omitempty"`
Addr string `yaml:"addr"`
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
MaxRetries int `yaml:"max_retries,omitempty"`
Timeout time.Duration `yaml:"timeout,omitempty"`
MinRetryBackoff time.Duration `yaml:"min_retry_backoff,omitempty"`
MaxRetryBackoff time.Duration `yaml:"max_retry_backoff,omitempty"`
}
type SeqAPI ¶
type SeqAPI struct {
Options SeqAPIOptions `yaml:"options"`
Envs map[string]*SeqAPIOptions `yaml:"envs,omitempty"`
DefaultEnv string `yaml:"default_env,omitempty"`
}
type SeqAPICaches ¶
type SeqAPICaches struct {
Events *HandlerCache `yaml:"events,omitempty"`
LogsLifespan *HandlerCache `yaml:"logs_lifespan,omitempty"`
Fields *HandlerCache `yaml:"fields,omitempty"`
}
type SeqAPILimits ¶
type SeqAPILimits struct {
MaxSearchLimit int32 `yaml:"max_search_limit,omitempty"`
MaxSearchTotal int64 `yaml:"max_search_total,omitempty"`
MaxSearchOffset int32 `yaml:"max_search_offset,omitempty"`
MaxExportLimit int32 `yaml:"max_export_limit,omitempty"`
SeqCLIMaxSearchLimit int `yaml:"seq_cli_max_search_limit,omitempty"`
MaxParallelExportRequests int `yaml:"max_parallel_export_requests,omitempty"`
MaxAggregationsPerRequest int `yaml:"max_aggregations_per_request,omitempty"`
MaxBucketsPerAggregationTs int `yaml:"max_buckets_per_aggregation_ts,omitempty"`
}
type SeqAPIOptions ¶
type SeqAPIOptions struct {
SeqDBID string `yaml:"seq_db_id,omitempty"`
Limits SeqAPILimits `yaml:"limits,omitempty"`
Caches SeqAPICaches `yaml:"caches,omitempty"`
Masking *Masking `yaml:"masking,omitempty"`
PinnedFields []Field `yaml:"pinned_fields,omitempty"`
SystemFields []Field `yaml:"system_fields,omitempty"`
}
type SeqDBClient ¶
type SeqDBClient struct {
Timeout time.Duration `yaml:"timeout"`
AvgDocSize int `yaml:"avg_doc_size,omitempty"`
Addrs []string `yaml:"addrs"`
RequestRetries int `yaml:"request_retries,omitempty"`
RequestRetriesBackoff *Backoff `yaml:"request_retries_backoff,omitempty"`
ClientMode string `yaml:"client_mode,omitempty"`
GRPCParams *GRPCParams `yaml:"grpc_params,omitempty"`
}
type Server ¶
type Server struct {
HTTP *HTTP `yaml:"http,omitempty"`
GRPC *GRPC `yaml:"grpc,omitempty"`
Debug Debug `yaml:"debug"`
Auth *Auth `yaml:"auth,omitempty"`
RateLimiting *RateLimiting `yaml:"rate_limiting,omitempty"`
}
type SessionStore ¶
Click to show internal directories.
Click to hide internal directories.