config

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBlockStoreType                    = "local"
	DefaultBlockStoreLocalPath               = "~/data/lakefs/block"
	DefaultBlockStoreS3Region                = "us-east-1"
	DefaultBlockStoreS3StreamingChunkSize    = 2 << 19         // 1MiB by default per chunk
	DefaultBlockStoreS3StreamingChunkTimeout = time.Second * 1 // or 1 seconds, whatever comes first

	DefaultCommittedLocalCacheRangePercent          = 0.9
	DefaultCommittedLocalCacheMetaRangePercent      = 0.1
	DefaultCommittedLocalCacheBytes                 = 1 * 1024 * 1024 * 1024
	DefaultCommittedLocalCacheDir                   = "~/data/lakefs/cache"
	DefaultCommittedPebbleSSTableCacheSizeBytes     = 400_000_000
	DefaultCommittedLocalCacheNumUploaders          = 10
	DefaultCommittedBlockStoragePrefix              = "_lakefs"
	DefaultCommittedPermanentMinRangeSizeBytes      = 0
	DefaultCommittedPermanentMaxRangeSizeBytes      = 20 * 1024 * 1024
	DefaultCommittedPermanentRangeRaggednessEntries = 50_000

	DefaultBlockStoreGSS3Endpoint = "https://storage.googleapis.com"

	DefaultAuthCacheEnabled = true
	DefaultAuthCacheSize    = 1024
	DefaultAuthCacheTTL     = 20 * time.Second
	DefaultAuthCacheJitter  = 3 * time.Second

	DefaultListenAddr          = "0.0.0.0:8000"
	DefaultS3GatewayDomainName = "s3.local.lakefs.io"
	DefaultS3GatewayRegion     = "us-east-1"
	DefaultS3MaxRetries        = 5

	DefaultStatsEnabled       = true
	DefaultStatsAddr          = "https://stats.treeverse.io"
	DefaultStatsFlushInterval = time.Second * 30

	MetaStoreType          = "metastore.type"
	MetaStoreHiveURI       = "metastore.hive.uri"
	MetastoreGlueCatalogID = "metastore.glue.catalog_id"

	DefaultAzureTryTimeout = 10 * time.Minute
	DefaultAzureAuthMethod = "access-key"
)
View Source
const (
	ListenAddressKey = "listen_address"

	LoggingFormatKey = "logging.format"
	LoggingLevelKey  = "logging.level"
	LoggingOutputKey = "logging.output"

	AuthCacheEnabledKey = "auth.cache.enabled"
	AuthCacheSizeKey    = "auth.cache.size"
	AuthCacheTTLKey     = "auth.cache.ttl"
	AuthCacheJitterKey  = "auth.cache.jitter"

	BlockstoreTypeKey                    = "blockstore.type"
	BlockstoreLocalPathKey               = "blockstore.local.path"
	BlockstoreS3RegionKey                = "blockstore.s3.region"
	BlockstoreS3StreamingChunkSizeKey    = "blockstore.s3.streaming_chunk_size"
	BlockstoreS3StreamingChunkTimeoutKey = "blockstore.s3.streaming_chunk_timeout"
	BlockstoreS3MaxRetriesKey            = "blockstore.s3.max_retries"

	BlockstoreAzureTryTimeoutKey                = "blockstore.azure.try_timeout"
	BlockstoreAzureStorageAccountKey            = "blockstore.azure.storage_account"
	BlockstoreAzureStorageAccessKey             = "blockstore.azure.storage_access_key"
	BlockstoreAzureAuthMethod                   = "blockstore.azure.auth_method"
	CommittedLocalCacheSizeBytesKey             = "committed.local_cache.size_bytes"
	CommittedLocalCacheDirKey                   = "committed.local_cache.dir"
	CommittedLocalCacheNumUploadersKey          = "committed.local_cache.max_uploaders_per_writer"
	CommittedLocalCacheRangeProportionKey       = "committed.local_cache.range_proportion"
	CommittedLocalCacheMetaRangeProportionKey   = "committed.local_cache.metarange_proportion"
	CommittedBlockStoragePrefixKey              = "committed.block_storage_prefix"
	CommittedPermanentStorageMinRangeSizeKey    = "committed.permanent.min_range_size_bytes"
	CommittedPermanentStorageMaxRangeSizeKey    = "committed.permanent.max_range_size_bytes"
	CommittedPermanentStorageRangeRaggednessKey = "committed.permanent.range_raggedness_entries"

	CommittedPebbleSSTableCacheSizeBytesKey = "committed.sstable.memory.cache_size_bytes"

	GatewaysS3DomainNameKey = "gateways.s3.domain_name"
	GatewaysS3RegionKey     = "gateways.s3.region"

	BlockstoreGSS3EndpointKey = "blockstore.gs.s3_endpoint"

	StatsEnabledKey       = "stats.enabled"
	StatsAddressKey       = "stats.address"
	StatsFlushIntervalKey = "stats.flush_interval"
)

Default flag keys

View Source
const (
	ModuleName           = "github.com/treeverse/lakefs"
	ProjectDirectoryName = "lakefs"

	DefaultLoggingFormat = "text"
	DefaultLoggingLevel  = "INFO"
	DefaultLoggingOutput = "-"
)

Variables

View Source
var (
	ErrMissingSecretKey  = errors.New("auth.encrypt.secret_key cannot be empty")
	ErrInvalidProportion = errors.New("total proportion isn't 1.0")
)
View Source
var (
	UnreleasedVersion = "dev"
	Version           = "dev"
)

Functions

func GetFixedInstallationID

func GetFixedInstallationID() string

func GetMetastoreAwsConfig

func GetMetastoreAwsConfig() *aws.Config

func GetMetastoreGlueCatalogID

func GetMetastoreGlueCatalogID() string

func GetMetastoreHiveURI

func GetMetastoreHiveURI() string

func GetMetastoreType

func GetMetastoreType() string

Types

type Config

type Config struct{}

func NewConfig

func NewConfig() *Config

func (*Config) GetAuthCacheConfig

func (c *Config) GetAuthCacheConfig() authparams.ServiceCache

func (*Config) GetAuthEncryptionSecret

func (c *Config) GetAuthEncryptionSecret() []byte

func (*Config) GetAwsConfig

func (c *Config) GetAwsConfig() *aws.Config

func (*Config) GetBlockAdapterAzureParams

func (c *Config) GetBlockAdapterAzureParams() (blockparams.Azure, error)

func (*Config) GetBlockAdapterGSParams

func (c *Config) GetBlockAdapterGSParams() (blockparams.GS, error)

func (*Config) GetBlockAdapterLocalParams

func (c *Config) GetBlockAdapterLocalParams() (blockparams.Local, error)

func (*Config) GetBlockAdapterS3Params

func (c *Config) GetBlockAdapterS3Params() (blockparams.S3, error)

func (*Config) GetBlockstoreType

func (c *Config) GetBlockstoreType() string

func (*Config) GetCommittedParams

func (c *Config) GetCommittedParams() *committed.Params

func (*Config) GetCommittedTierFSParams

func (c *Config) GetCommittedTierFSParams(ctx context.Context) (*pyramidparams.ExtParams, error)

GetCommittedTierFSParams returns parameters for building a tierFS. Caller must separately build and populate Adapter.

func (*Config) GetDatabaseParams

func (c *Config) GetDatabaseParams() dbparams.Database

func (*Config) GetListenAddress

func (c *Config) GetListenAddress() string

func (*Config) GetS3GatewayDomainName

func (c *Config) GetS3GatewayDomainName() string

func (*Config) GetS3GatewayFallbackURL

func (c *Config) GetS3GatewayFallbackURL() string

func (*Config) GetS3GatewayRegion

func (c *Config) GetS3GatewayRegion() string

func (*Config) GetStatsAddress

func (c *Config) GetStatsAddress() string

func (*Config) GetStatsEnabled

func (c *Config) GetStatsEnabled() bool

func (*Config) GetStatsFlushInterval

func (c *Config) GetStatsFlushInterval() time.Duration

func (*Config) Override

func (c *Config) Override(fn func(Configurator))

type Configurator

type Configurator interface {
	SetDefault(key string, value interface{})
}

type LogrusAWSAdapter

type LogrusAWSAdapter struct {
	// contains filtered or unexported fields
}

func (*LogrusAWSAdapter) Log

func (l *LogrusAWSAdapter) Log(vars ...interface{})

Jump to

Keyboard shortcuts

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