config

package
v0.0.0-...-89ca9ea Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HnswSearchSimple int = iota
	HnswSearchHuristic
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel string `envconfig:"ODS_LOG_LEVEL"`
	Port     string `envconfig:"ODS_PORT" default:":8000"`
	Hnsw     *HnswConfig
}

Config provoides configuration values for all components.

func GetConf

func GetConf(path string) (*Config, error)

GetConf accepts the path to a file, constructs an absolute path to the file, and attempt to parse it into a Config struct.

func ParseConfigFile

func ParseConfigFile(configFile string) (*Config, error)

ParseConfigFile parses the given file ito an odyssey config struct

type HnswConfig

type HnswConfig struct {
	SearchAlgorithm int
	LevelMultiplier float32
	Ef              int
	EfConstruction  int
	M               int
	Mmax            int
	Mmax0           int
}

Jump to

Keyboard shortcuts

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