Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { HTTP struct { ForwardPrefix string `yaml:"forwardPrefix" env:"RESTQL_FORWARD_PREFIX"` GlobalQueryTimeout time.Duration `env:"RESTQL_QUERY_GLOBAL_TIMEOUT" envDefault:"30s"` QueryResourceTimeout time.Duration `env:"RESTQL_QUERY_RESOURCE_TIMEOUT" envDefault:"5s"` Server struct { APIAddr string `env:"RESTQL_PORT,required"` APIHealthAddr string `env:"RESTQL_HEALTH_PORT,required"` PropfAddr string `env:"RESTQL_PPROF_PORT"` EnablePprof bool `env:"RESTQL_ENABLE_PPROF"` EnableFullPprof bool `env:"RESTQL_ENABLE_FULL_PPROF"` GracefulShutdownTimeout time.Duration `yaml:"gracefulShutdownTimeout"` ReadTimeout time.Duration `yaml:"readTimeout"` Middlewares struct { RequestID *requestIDConf `yaml:"requestId"` Timeout *timeoutConf `yaml:"timeout"` Cors *corsConf `yaml:"cors"` } `yaml:"middlewares"` } `yaml:"server"` Client struct { ConnTimeout time.Duration `yaml:"connectionTimeout"` MaxRequestTimeout time.Duration `yaml:"maxRequestTimeout"` MaxConnsPerHost int `yaml:"maxConnectionsPerHost"` MaxIdleConns int `yaml:"maxIdleConnections"` MaxIdleConnsPerHost int `yaml:"maxIdleConnectionsPerHost"` MaxIdleConnDuration time.Duration `yaml:"maxIdleConnectionDuration"` } `yaml:"client"` } `yaml:"http"` Logging struct { Enable bool `yaml:"enable" env:"RESTQL_LOGGING_ENABLE"` TimestampFieldName string `yaml:"timestampFieldName"` TimestampFieldFormat string `yaml:"timestampFieldFormat"` Level string `yaml:"level" env:"RESTQL_LOGGING_LEVEL"` Format string `yaml:"format"` } `yaml:"logging"` Cache struct { Mappings struct { MaxSize int `yaml:"maxSize" env:"RESTQL_CACHE_MAPPINGS_MAX_SIZE"` Expiration time.Duration `yaml:"expiration" env:"RESTQL_CACHE_MAPPINGS_EXPIRATION"` RefreshInterval time.Duration `yaml:"refreshInterval" env:"RESTQL_CACHE_MAPPINGS_REFRESH_INTERVAL"` RefreshQueueLength int `yaml:"refreshQueueLength" env:"RESTQL_CACHE_MAPPINGS_REFRESH_QUEUE_LENGTH"` } `yaml:"mappings"` Query struct { MaxSize int `yaml:"maxSize" env:"RESTQL_CACHE_QUERY_MAX_SIZE"` } `yaml:"query"` Parser struct { MaxSize int `yaml:"maxSize" env:"RESTQL_CACHE_PARSER_MAX_SIZE"` } `yaml:"parser"` } `yaml:"cache"` Plugins struct { Location string `yaml:"location" env:"RESTQL_PLUGINS_LOCATION"` } `yaml:"plugins"` Tenant string `env:"RESTQL_TENANT"` Mappings map[string]string `yaml:"mappings"` Queries map[string]map[string][]string `yaml:"queries"` Env EnvSource Build string }
Config represents all parameters allowed in restQL runtime.
Click to show internal directories.
Click to hide internal directories.