config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Global = new(Config)

Functions

func Init

func Init(path string) error

Init init the config.

Types

type Config

type Config struct {
	Env     string  `mapstructure:"env" json:"env" yaml:"env"`
	Engine  Engine  `mapstructure:"engine" json:"engine" yaml:"engine"`
	Storage Storage `mapstructure:"storage" json:"storage" yaml:"storage"`
	Http    Http    `mapstructure:"http" json:"http" yaml:"http"`
}

type Engine

type Engine struct {
	DefaultNumberOfShards   int `mapstructure:"default-number-of-shards" json:"default_number_of_shards" yaml:"default-number-of-shards"`
	DefaultBatchSize        int `mapstructure:"default-batch-size" json:"default_batch_size" yaml:"default-batch-size"`
	DefaultSearchResultSize int `mapstructure:"default-search-result-size" json:"default_search_result_size" yaml:"default-search-result-size"`
}

type Http

type Http struct {
	Addr string `mapstructure:"addr" json:"addr" yaml:"addr"`
}

type Storage

type Storage struct {
	MetaType string `mapstructure:"meta-type" json:"meta_type" yaml:"meta-type"`
	DataDir  string `mapstructure:"data-dir" json:"data_dir" yaml:"data-dir"`
}

Jump to

Keyboard shortcuts

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