config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BeskarYumConfigFile     = "beskar-yum.yaml"
	DefaultBeskarYumDataDir = "/tmp/beskar-yum"

	FSStorageDriver    = "filesystem"
	S3StorageDriver    = "s3"
	GCSStorageDriver   = "gcs"
	AzureStorageDriver = "azure"
)
View Source
const (
	DefaultConfigDir = "/etc/beskar"
	BeskarConfigFile = "beskar.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeskarConfig

type BeskarConfig struct {
	Version   string                       `yaml:"version"`
	Profiling bool                         `yaml:"profiling"`
	Hostname  string                       `yaml:"hostname"`
	Cache     Cache                        `yaml:"cache"`
	Gossip    Gossip                       `yaml:"gossip"`
	Registry  *configuration.Configuration `yaml:"registry"`
}

func ParseBeskarConfig

func ParseBeskarConfig(dir string) (*BeskarConfig, error)

type BeskarConfigV1

type BeskarConfigV1 BeskarConfig

type BeskarYumAzureStorage

type BeskarYumAzureStorage struct {
	Container   string `yaml:"container"`
	AccountName string `yaml:"account-name"`
	AccountKey  string `yaml:"account-key"`
}

type BeskarYumConfig

type BeskarYumConfig struct {
	Version         string           `yaml:"version"`
	Log             BeskarYumLog     `yaml:"log"`
	Addr            string           `yaml:"addr"`
	Gossip          Gossip           `yaml:"gossip"`
	Storage         BeskarYumStorage `yaml:"storage"`
	Profiling       bool             `yaml:"profiling"`
	DataDir         string           `yaml:"datadir"`
	ConfigDirectory string           `yaml:"-"`
}

func ParseBeskarYumConfig

func ParseBeskarYumConfig(dir string) (*BeskarYumConfig, error)

func (BeskarYumConfig) ListenIP

func (bc BeskarYumConfig) ListenIP() (string, error)

func (BeskarYumConfig) ListenPort

func (bc BeskarYumConfig) ListenPort() (string, error)

type BeskarYumConfigV1

type BeskarYumConfigV1 BeskarYumConfig

type BeskarYumFSStorage

type BeskarYumFSStorage struct {
	Directory string `yaml:"directory"`
}

type BeskarYumGCSStorage

type BeskarYumGCSStorage struct {
	Bucket  string `yaml:"bucket"`
	Keyfile string `yaml:"keyfile"`
}

type BeskarYumLog added in v0.0.3

type BeskarYumLog struct {
	Level  string `yaml:"level"`
	Format string `yaml:"format"`
}

func (*BeskarYumLog) Logger added in v0.0.3

func (bl *BeskarYumLog) Logger(handlerWrapper func(handler slog.Handler) slog.Handler) (*slog.Logger, error)

type BeskarYumRegistry

type BeskarYumRegistry struct {
	URL      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type BeskarYumS3Storage

type BeskarYumS3Storage struct {
	Endpoint        string `yaml:"endpoint"`
	Bucket          string `yaml:"bucket"`
	AccessKeyID     string `yaml:"access-key-id"`
	SecretAccessKey string `yaml:"secret-access-key"`
	SessionToken    string `yaml:"session-token"`
	Region          string `yaml:"region"`
	DisableSSL      bool   `yaml:"disable-ssl"`
}

type BeskarYumStorage

type BeskarYumStorage struct {
	Driver     string                `yaml:"driver"`
	Prefix     string                `yaml:"prefix"`
	S3         BeskarYumS3Storage    `yaml:"s3"`
	Filesystem BeskarYumFSStorage    `yaml:"filesystem"`
	GCS        BeskarYumGCSStorage   `yaml:"gcs"`
	Azure      BeskarYumAzureStorage `yaml:"azure"`
}

type Cache

type Cache struct {
	Addr string `yaml:"addr"`
	Size uint32 `yaml:"size"`
}

type Gossip

type Gossip struct {
	Addr  string   `yaml:"addr"`
	Key   string   `yaml:"key"`
	Peers []string `yaml:"peers"`
}

Jump to

Keyboard shortcuts

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