config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(file string)

Types

type BasicAuthConfiguration

type BasicAuthConfiguration struct {
	Username string `json:"username" mapstructure:"username" default:""`
	Password string `json:"password" mapstructure:"password" default:""`
}

type Configuration

type Configuration struct {
	Gigapi GigapiConfiguration `json:"gigapi" mapstructure:"gigapi" default:""`
	// HTTP port to listen on
	Port int `json:"port" mapstructure:"port" default:"7971"`
	// Host to bind to (0.0.0.0 for all interfaces)
	Host string `json:"host" mapstructure:"host" default:"0.0.0.0"`
	// Basic authentication credentials
	BasicAuth BasicAuthConfiguration `json:"basic_auth" mapstructure:"basic_auth" default:""`
	// FlightSQL port to listen on
	FlightSqlPort int `json:"flightsql_port" mapstructure:"flightsql_port" default:"8082"`
	// Disable UI for querier
	DisableUI bool `json:"disable_ui" mapstructure:"disable_ui" default:"false"`
	// Log level (debug, info, warn, error, fatal)
	Loglevel string `json:"loglevel" mapstructure:"loglevel" default:"info"`
	// Execution mode (readonly, writeonly, compaction, aio)
	Mode string `json:"mode" mapstructure:"mode" default:"aio"`
}
var Config *Configuration

type GigapiConfiguration

type GigapiConfiguration struct {
	// Root folder for all the data files
	Root string `json:"root" mapstructure:"root" default:""`
	// Base timeout between merges
	MergeTimeoutS int `json:"merge_timeout_s" mapstructure:"merge_timeout_s" default:"10"`
	// Timeout before saving the new data to the disk
	SaveTimeoutS float64 `json:"save_timeout_s" mapstructure:"save_timeout_s" default:"1"`
	// Disable merging
	NoMerges bool `json:"no_merges" mapstructure:"no_merges" default:"false"`
}

Jump to

Keyboard shortcuts

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