Documentation ¶
Index ¶
- Constants
- Variables
- func FromEnv(config *Config) error
- func GetConfigOptionGroup() *swag.CommandLineOptionsGroup
- type APIKey
- type AnonymousAccess
- type Authentication
- type Authorization
- type AutoSchema
- type CORS
- type Config
- type Contextionary
- type DiskUse
- type Flags
- type GRPC
- type MemUse
- type Monitoring
- type OIDC
- type Persistence
- type Profiling
- type QueryDefaults
- type ResourceUsage
- type WeaviateConfig
Constants ¶
const ( // These BM25 tuning params can be overwritten on a per-class basis DefaultBM25k1 = float32(1.2) DefaultBM25b = float32(0.75) )
const ( DefaultMaxImportGoroutinesFactor = float64(1.5) DefaultDiskUseWarningPercentage = uint64(80) DefaultDiskUseReadonlyPercentage = uint64(90) DefaultMemUseWarningPercentage = uint64(80) // TODO: off by default for now, to make sure // the measurement is reliable. once // confirmed, we can set this to 90 DefaultMemUseReadonlyPercentage = uint64(0) )
const ( DefaultCORSAllowOrigin = "*" DefaultCORSAllowMethods = "*" DefaultCORSAllowHeaders = "" /* 239-byte string literal not displayed */ )
const ( DefaultQueryMaximumResults = int64(10000) DefaultQueryNestedCrossReferenceLimit = int64(100000) )
const ( DefaultPersistenceFlushIdleMemtablesAfter = 60 DefaultPersistenceMemtablesMaxSize = 200 DefaultPersistenceMemtablesMinDuration = 15 DefaultPersistenceMemtablesMaxDuration = 45 DefaultMaxConcurrentGetRequests = 0 DefaultGRPCPort = 50051 DefaultMinimumReplicationFactor = 1 )
const DefaultCleanupIntervalSeconds = int64(60)
DefaultCleanupIntervalSeconds can be overwritten on a per-class basis
const DefaultConfigFile string = "./weaviate.conf.json"
DefaultConfigFile is the default file when no config file is provided
const DefaultGossipBindPort = 7946
DefaultGossipBindPort uses the hashicorp/memberlist default port value assigned with the use of DefaultLocalConfig
const VectorizerModuleNone = "none"
const VectorizerModuleText2VecContextionary = "text2vec-contextionary"
TODO: This should be retrieved dynamically from all installed modules
Variables ¶
var GitHash = "unknown"
GitHash keeps the current git hash commit information
var ServerVersion string
ServerVersion is set when the misc handlers are setup. When misc handlers are setup, the entire swagger spec is already being parsed for the server version. This is a good time for us to set ServerVersion, so that the spec only needs to be parsed once.
Functions ¶
func FromEnv ¶
FromEnv takes a *Config as it will respect initial config that has been provided by other means (e.g. a config file) and will only extend those that are set
func GetConfigOptionGroup ¶
func GetConfigOptionGroup() *swag.CommandLineOptionsGroup
GetConfigOptionGroup creates an option group for swagger
Types ¶
type AnonymousAccess ¶
type AnonymousAccess struct {
Enabled bool `json:"enabled" yaml:"enabled"`
}
AnonymousAccess considers users without any auth information as authenticated as "anonymous" rather than denying their request immediately. Note that enabling anonymous access ONLY affects Authentication, not Authorization.
type Authentication ¶
type Authentication struct { OIDC OIDC `json:"oidc" yaml:"oidc"` AnonymousAccess AnonymousAccess `json:"anonymous_access" yaml:"anonymous_access"` APIKey APIKey }
Authentication configuration
func (Authentication) Validate ¶
func (a Authentication) Validate() error
Validate the Authentication configuration. This only validates at a general level. Validation specific to the individual auth methods should happen inside their respective packages
type Authorization ¶
Authorization configuration
func (Authorization) Validate ¶
func (a Authorization) Validate() error
Validate the Authorization configuration. This only validates at a general level. Validation specific to the individual auth methods should happen inside their respective packages
type AutoSchema ¶
type AutoSchema struct { Enabled bool `json:"enabled" yaml:"enabled"` DefaultString string `json:"defaultString" yaml:"defaultString"` DefaultNumber string `json:"defaultNumber" yaml:"defaultNumber"` DefaultDate string `json:"defaultDate" yaml:"defaultDate"` }
func (AutoSchema) Validate ¶
func (a AutoSchema) Validate() error
type Config ¶
type Config struct { Name string `json:"name" yaml:"name"` Debug bool `json:"debug" yaml:"debug"` QueryDefaults QueryDefaults `json:"query_defaults" yaml:"query_defaults"` QueryMaximumResults int64 `json:"query_maximum_results" yaml:"query_maximum_results"` QueryNestedCrossReferenceLimit int64 `json:"query_nested_cross_reference_limit" yaml:"query_nested_cross_reference_limit"` Contextionary Contextionary `json:"contextionary" yaml:"contextionary"` Authentication Authentication `json:"authentication" yaml:"authentication"` Authorization Authorization `json:"authorization" yaml:"authorization"` Origin string `json:"origin" yaml:"origin"` Persistence Persistence `json:"persistence" yaml:"persistence"` DefaultVectorizerModule string `json:"default_vectorizer_module" yaml:"default_vectorizer_module"` DefaultVectorDistanceMetric string `json:"default_vector_distance_metric" yaml:"default_vector_distance_metric"` EnableModules string `json:"enable_modules" yaml:"enable_modules"` ModulesPath string `json:"modules_path" yaml:"modules_path"` ModuleHttpClientTimeout time.Duration `json:"modules_client_timeout" yaml:"modules_client_timeout"` AutoSchema AutoSchema `json:"auto_schema" yaml:"auto_schema"` Cluster cluster.Config `json:"cluster" yaml:"cluster"` Replication replication.GlobalConfig `json:"replication" yaml:"replication"` Monitoring Monitoring `json:"monitoring" yaml:"monitoring"` GRPC GRPC `json:"grpc" yaml:"grpc"` Profiling Profiling `json:"profiling" yaml:"profiling"` ResourceUsage ResourceUsage `json:"resource_usage" yaml:"resource_usage"` MaxImportGoroutinesFactor float64 `json:"max_import_goroutine_factor" yaml:"max_import_goroutine_factor"` MaximumConcurrentGetRequests int `json:"maximum_concurrent_get_requests" yaml:"maximum_concurrent_get_requests"` TrackVectorDimensions bool `json:"track_vector_dimensions" yaml:"track_vector_dimensions"` ReindexVectorDimensionsAtStartup bool `json:"reindex_vector_dimensions_at_startup" yaml:"reindex_vector_dimensions_at_startup"` RecountPropertiesAtStartup bool `json:"recount_properties_at_startup" yaml:"recount_properties_at_startup"` ReindexSetToRoaringsetAtStartup bool `json:"reindex_set_to_roaringset_at_startup" yaml:"reindex_set_to_roaringset_at_startup"` IndexMissingTextFilterableAtStartup bool `json:"index_missing_text_filterable_at_startup" yaml:"index_missing_text_filterable_at_startup"` DisableGraphQL bool `json:"disable_graphql" yaml:"disable_graphql"` AvoidMmap bool `json:"avoid_mmap" yaml:"avoid_mmap"` CORS CORS `json:"cors" yaml:"cors"` }
Config outline of the config file
type Contextionary ¶
type Contextionary struct {
URL string `json:"url" yaml:"url"`
}
type DiskUse ¶
type Flags ¶
type Flags struct {
ConfigFile string `long:"config-file" description:"path to config file (default: ./weaviate.conf.json)"`
}
Flags are input options
type GRPC ¶ added in v1.19.0
type GRPC struct { Port int `json:"port" yaml:"port"` CertFile string `json:"certFile" yaml:"certFile"` KeyFile string `json:"keyFile" yaml:"keyFile"` }
Support independent TLS credentials for gRPC
type MemUse ¶
type Monitoring ¶
type OIDC ¶
type OIDC struct { Enabled bool `json:"enabled" yaml:"enabled"` Issuer string `json:"issuer" yaml:"issuer"` ClientID string `json:"client_id" yaml:"client_id"` SkipClientIDCheck bool `yaml:"skip_client_id_check" json:"skip_client_id_check"` UsernameClaim string `yaml:"username_claim" json:"username_claim"` GroupsClaim string `yaml:"groups_claim" json:"groups_claim"` Scopes []string `yaml:"scopes" json:"scopes"` }
OIDC configures the OIDC middleware
type Persistence ¶
type Persistence struct { DataPath string `json:"dataPath" yaml:"dataPath"` FlushIdleMemtablesAfter int `json:"flushIdleMemtablesAfter" yaml:"flushIdleMemtablesAfter"` MemtablesMaxSizeMB int `json:"memtablesMaxSizeMB" yaml:"memtablesMaxSizeMB"` MemtablesMinActiveDurationSeconds int `json:"memtablesMinActiveDurationSeconds" yaml:"memtablesMinActiveDurationSeconds"` MemtablesMaxActiveDurationSeconds int `json:"memtablesMaxActiveDurationSeconds" yaml:"memtablesMaxActiveDurationSeconds"` }
func (Persistence) Validate ¶
func (p Persistence) Validate() error
type QueryDefaults ¶
type QueryDefaults struct {
Limit int64 `json:"limit" yaml:"limit"`
}
QueryDefaults for optional parameters
type ResourceUsage ¶
func (ResourceUsage) Validate ¶
func (r ResourceUsage) Validate() error
type WeaviateConfig ¶
WeaviateConfig represents the used schema's
func (*WeaviateConfig) GetHostAddress ¶
func (f *WeaviateConfig) GetHostAddress() string
GetHostAddress from config locations
func (*WeaviateConfig) LoadConfig ¶
func (f *WeaviateConfig) LoadConfig(flags *swag.CommandLineOptionsGroup, logger logrus.FieldLogger) error
LoadConfig from config locations