config

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Store StoreConfig `toml:"store"`
}

Config represents the devtap configuration file.

func Default

func Default() *Config

Default returns the default configuration.

func Load

func Load() (*Config, error)

Load reads the config from the default path (~/.devtap/config.toml), falling back to defaults if the file doesn't exist.

func LoadFrom

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

LoadFrom reads the config from the given path.

type GreptimeDBConfig

type GreptimeDBConfig struct {
	Endpoint      string `toml:"endpoint"`       // gRPC endpoint for ingestion (default "127.0.0.1:4001")
	MySQLEndpoint string `toml:"mysql_endpoint"` // MySQL protocol endpoint for queries (default "127.0.0.1:4002")
	Database      string `toml:"database"`       // database name (default "public")
}

GreptimeDBConfig holds GreptimeDB connection settings.

func (*GreptimeDBConfig) AuthToken

func (c *GreptimeDBConfig) AuthToken() string

AuthToken returns the GreptimeDB auth token from the environment.

func (*GreptimeDBConfig) Password

func (c *GreptimeDBConfig) Password() string

Password returns the GreptimeDB password from the environment.

func (*GreptimeDBConfig) Username

func (c *GreptimeDBConfig) Username() string

Username returns the GreptimeDB username from the environment.

type StoreConfig

type StoreConfig struct {
	Backend    string           `toml:"backend"` // "file" (default) | "greptimedb"
	GreptimeDB GreptimeDBConfig `toml:"greptimedb"`
}

StoreConfig configures the storage backend.

Jump to

Keyboard shortcuts

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