config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 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 server configuration (reader and writer)
	HTTP HTTPConfiguration `json:"http" mapstructure:"http" default:""`
	// FlightSQL server configuration
	FlightSql FlightSqlConfiguration `json:"flightsql" mapstructure:"flightsql" default:""`
	// Log level (debug, info, warn, error, fatal)
	Loglevel string `json:"loglevel" mapstructure:"loglevel" default:"info"`
}
var Config *Configuration

type FlightSqlConfiguration added in v0.0.6

type FlightSqlConfiguration struct {
	// Port to run flightSQL server
	Port int `json:"port" mapstructure:"port" default:"8082"`
	// Enable FlightSQL server
	Enable bool `json:"enable" mapstructure:"enable" default:"true"`
}

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"`
	// Enable UI for querier
	UI bool `json:"ui" mapstructure:"ui" default:"true"`
	// Execution mode (readonly, writeonly, compaction, aio)
	Mode string `json:"mode" mapstructure:"mode" default:"aio"`
}

type HTTPConfiguration added in v0.0.6

type HTTPConfiguration struct {
	// 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 configuration
	BasicAuth BasicAuthConfiguration `json:"basic_auth" mapstructure:"basic_auth" default:""`
}

Jump to

Keyboard shortcuts

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