config

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 6 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 {
	*odps.Config
	*ConfigEnv
}

func NewConfig

func NewConfig(envs ...string) (*Config, error)

NewConfig parses the environment variables and returns the mc configuration.

type ConfigEnv added in v0.1.2

type ConfigEnv struct {
	LogLevel                    string `env:"LOG_LEVEL" envDefault:"INFO"`
	OtelCollectorGRPCEndpoint   string `env:"OTEL_COLLECTOR_GRPC_ENDPOINT"`
	OtelAttributes              string `env:"OTEL_ATTRIBUTES"`
	MCServiceAccount            string `env:"MC_SERVICE_ACCOUNT"`
	LoadMethod                  string `env:"LOAD_METHOD" envDefault:"APPEND"`
	QueryFilePath               string `env:"QUERY_FILE_PATH" envDefault:"/data/in/query.sql"`
	DestinationTableID          string `env:"DESTINATION_TABLE_ID"`
	DStart                      string `env:"DSTART"`
	DEnd                        string `env:"DEND"`
	ExecutionProject            string `env:"EXECUTION_PROJECT"`
	Concurrency                 int    `env:"CONCURRENCY" envDefault:"7"`
	LogViewRetentionInDays      int    `env:"LOG_VIEW_RETENTION_IN_DAYS" envDefault:"2"`
	DisableMultiQueryGeneration bool   `env:"DISABLE_MULTI_QUERY_GENERATION" envDefault:"false"`
	// TODO: delete this
	DevEnablePartitionValue string `env:"DEV__ENABLE_PARTITION_VALUE" envDefault:"false"`
	DevEnableAutoPartition  string `env:"DEV__ENABLE_AUTO_PARTITION" envDefault:"false"`
}

ConfigEnv is a mc configuration for the component.

Jump to

Keyboard shortcuts

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