Documentation
¶
Index ¶
- Constants
- type ApiRateLimiters
- type ApiToRateLimiters
- type CH
- type CORS
- type Cache
- type Clients
- type Config
- type DB
- type ErrorGroups
- type FileStore
- type GRPCKeepaliveParams
- type Handlers
- type InmemoryCache
- type LogTagsMapping
- type MassExport
- type OIDC
- type PinnedField
- type RateLimiter
- type Redis
- type S3
- type SeqAPI
- type SeqProxyDownloader
- type Server
- type SessionStore
- type UserToRateLimiter
Constants ¶
View Source
const (
ProxyClientModeGRPC = "grpc"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiRateLimiters ¶
type ApiRateLimiters struct {
Default RateLimiter `yaml:"default"`
SpecialUsers UserToRateLimiter `yaml:"spec_users"`
}
type ApiToRateLimiters ¶
type ApiToRateLimiters map[string]ApiRateLimiters
type CORS ¶
type CORS struct {
AllowedOrigins []string `yaml:"allowed_origins"`
AllowedMethods []string `yaml:"allowed_methods"`
AllowedHeaders []string `yaml:"allowed_headers"`
ExposedHeaders []string `yaml:"exposed_headers"`
AllowCredentials bool `yaml:"allow_credentials"`
MaxAge int `yaml:"max_age"`
OptionsPassthrough bool `yaml:"options_passthrough"`
}
type Cache ¶
type Cache struct {
Inmemory InmemoryCache `yaml:"inmemory"`
Redis *Redis `yaml:"redis"`
}
type Clients ¶
type Clients struct {
SeqDBTimeout time.Duration `yaml:"seq_db_timeout"`
SeqDBAvgDocSize int `yaml:"seq_db_avg_doc_size"`
SeqDBAddrs []string `yaml:"seq_db_addrs"`
RequestRetries int `yaml:"request_retries"`
InitialRetryBackoff time.Duration `yaml:"initial_retry_backoff"`
MaxRetryBackoff time.Duration `yaml:"max_retry_backoff"`
ProxyClientMode string `yaml:"proxy_client_mode"`
GRPCKeepaliveParams *GRPCKeepaliveParams `yaml:"grpc_keepalive_params"`
}
type Config ¶
type DB ¶
type DB struct {
Name string `yaml:"name"`
Host string `yaml:"host"`
Port int64 `yaml:"port"`
Pass string `yaml:"pass"`
User string `yaml:"user"`
RequestTimeout time.Duration `yaml:"request_timeout"`
ConnectionPoolCapacity int64 `yaml:"connection_pool_capacity"`
UsePreparedStatements *bool `yaml:"use_prepared_statements,omitempty"`
}
func (*DB) ConnString ¶
type ErrorGroups ¶
type ErrorGroups struct {
LogTagsMapping LogTagsMapping `yaml:"log_tags_mapping"`
QueryFilter map[string]string `yaml:"query_filter"`
}
type GRPCKeepaliveParams ¶
type GRPCKeepaliveParams 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"`
// 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"`
// 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"`
}
type Handlers ¶
type Handlers struct {
SeqAPI SeqAPI `yaml:"seq_api"`
ErrorGroups ErrorGroups `yaml:"error_groups"`
MassExport *MassExport `yaml:"mass_export"`
}
type InmemoryCache ¶
type LogTagsMapping ¶
type MassExport ¶
type MassExport struct {
BatchSize uint64 `yaml:"batch_size"`
WorkersCount int `yaml:"workers_count"`
TasksChannelSize int `yaml:"tasks_channel_size"`
PartLength time.Duration `yaml:"part_length"`
URLPrefix string `yaml:"url_prefix"`
AllowedUsers []string `yaml:"allowed_users"`
FileStore *FileStore `yaml:"file_store"`
SessionStore *SessionStore `yaml:"session_store"`
SeqProxyDownloader *SeqProxyDownloader `yaml:"seq_proxy_downloader"`
}
type OIDC ¶
type OIDC struct {
SkipVerify bool `yaml:"skip_verify"`
AuthURLs []string `yaml:"auth_urls"`
RootCA string `yaml:"root_ca"`
CACert string `yaml:"ca_cert"`
PrivateKey string `yaml:"private_key"`
SSLSkipVerify bool `yaml:"ssl_skip_verify"`
AllowedClients []string `yaml:"allowed_clients"`
CacheSecretKey string `yaml:"cache_secret_key"`
}
type PinnedField ¶
type RateLimiter ¶
type Redis ¶
type Redis struct {
Addr string `yaml:"addr"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Timeout time.Duration `yaml:"timeout"`
MaxRetries int `yaml:"max_retries"`
MinRetryBackoff time.Duration `yaml:"min_retry_backoff"`
MaxRetryBackoff time.Duration `yaml:"max_retry_backoff"`
}
type SeqAPI ¶
type SeqAPI struct {
MaxSearchLimit int32 `yaml:"max_search_limit"`
MaxSearchTotalLimit int64 `yaml:"max_search_total_limit"`
MaxSearchOffsetLimit int32 `yaml:"max_search_offset_limit"`
MaxExportLimit int32 `yaml:"max_export_limit"`
SeqCLIMaxSearchLimit int `yaml:"seq_cli_max_search_limit"`
MaxParallelExportRequests int `yaml:"max_parallel_export_requests"`
MaxAggregationsPerRequest int `yaml:"max_aggregations_per_request"`
MaxBucketsPerAggregationTs int `yaml:"max_buckets_per_aggregation_ts"`
EventsCacheTTL time.Duration `yaml:"events_cache_ttl"`
PinnedFields []PinnedField `yaml:"pinned_fields"`
LogsLifespanCacheKey string `yaml:"logs_lifespan_cache_key"`
LogsLifespanCacheTTL time.Duration `yaml:"logs_lifespan_cache_ttl"`
FieldsCacheTTL time.Duration `yaml:"fields_cache_ttl"`
}
type SeqProxyDownloader ¶
type Server ¶
type Server struct {
DebugAddr string `yaml:"debug_addr"`
HTTPAddr string `yaml:"http_addr"`
GRPCAddr string `yaml:"grpc_addr"`
CORS *CORS `yaml:"cors"`
OIDC *OIDC `yaml:"oidc"`
GRPCConnectionTimeout time.Duration `yaml:"grpc_connection_timeout"`
HTTPReadHeaderTimeout time.Duration `yaml:"http_read_header_timeout"`
HTTPReadTimeout time.Duration `yaml:"http_read_timeout"`
HTTPWriteTimeout time.Duration `yaml:"http_write_timeout"`
DB *DB `yaml:"db"`
CH *CH `yaml:"clickhouse"`
RateLimiters ApiToRateLimiters `yaml:"rate_limiters"`
Cache Cache `yaml:"cache"`
JWTSecretKey string `yaml:"jwt_secret_key"`
}
type SessionStore ¶
type UserToRateLimiter ¶
type UserToRateLimiter map[string]RateLimiter
Click to show internal directories.
Click to hide internal directories.