config

package
v0.0.0-...-8832f83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFile string = "./weaviate.conf.json"

DefaultConfigFile is the default file when no config file is provided

View Source
const DefaultEnvironment string = "development"

DefaultEnvironment is the default env when no env is provided

Variables

This section is empty.

Functions

func GetConfigOptionGroup

func GetConfigOptionGroup() *swag.CommandLineOptionsGroup

GetConfigOptionGroup creates a option group for swagger

Types

type Broker

type Broker struct {
	Host string `json:"host"`
	Port int32  `json:"port"`
}

Broker checks if broker details are set

type ConfigStore

type ConfigStore struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

type Contextionary

type Contextionary struct {
	KNNFile string `json:"knn_file"`
	IDXFile string `json:"idx_file"`
	// contains filtered or unexported fields
}

type Database

type Database struct {
	Name           string      `json:"name"`
	DatabaseConfig interface{} `json:"database_config"`
}

Database is the outline of the database

type Development

type Development struct {
	ExternalInstances []Instance `json:"external_instances"`
}

Development is the outline of (temporary) config variables Note: the purpose is that these variables will be moved somewhere else in time

type Environment

type Environment struct {
	Name          string        `json:"name"`
	Database      Database      `json:"database"`
	Schemas       Schemas       `json:"schemas"`
	Broker        Broker        `json:"broker"`
	Network       *Network      `json:"network"`
	Limit         int64         `json:"limit"`
	Debug         bool          `json:"debug"`
	Development   Development   `json:"development"`
	Contextionary Contextionary `json:"contextionary"`
	ConfigStore   ConfigStore   `json:"configuration_storage"`
}

Environment outline of the environment inside the config file

type File

type File struct {
	Environments []Environment `json:"environments"`
}

File gives the outline of the config file

type Flags

type Flags struct {
	ConfigSection string `long:"config" description:"the section inside the config file that has to be used"`
	ConfigFile    string `long:"config-file" description:"path to config file (default: ./weaviate.conf.json)"`
}

Flags are input options

type Instance

type Instance struct {
	URL      string `json:"url"`
	APIKey   string `json:"api_key"`
	APIToken string `json:"api_token"`
}

Instance is the outline for an external instance whereto crossreferences can be resolved

type Network

type Network struct {
	GenesisURL string `json:"genesis_url"`
	PublicURL  string `json:"public_url"`
	PeerName   string `json:"peer_name"`
}

type Schemas

type Schemas struct {
	Thing  string `json:"thing"`
	Action string `json:"action"`
}

Schemas contains the schema for 'things' and for 'actions'

type WeaviateConfig

type WeaviateConfig struct {
	Environment Environment
	Hostname    string
	Scheme      string
}

WeaviateConfig represents the used schema's

func (*WeaviateConfig) GetHostAddress

func (f *WeaviateConfig) GetHostAddress() string

GetHostAddress from config locations

func (*WeaviateConfig) GetInstance

func (f *WeaviateConfig) GetInstance(hostname string) (instance Instance, err error)

GetInstance from config

func (*WeaviateConfig) LoadConfig

LoadConfig from config locations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL