config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 11 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"`
	Cache     Cache                        `yaml:"cache"`
	Gossip    Gossip                       `yaml:"gossip"`
	Plugins   map[string]Plugin            `yaml:"plugins"`
	Registry  *configuration.Configuration `yaml:"registry"`
}

func ParseBeskarConfig

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

func (*BeskarConfig) RunInKubernetes

func (bc *BeskarConfig) RunInKubernetes() bool

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"`
	Addr            string            `yaml:"addr"`
	Registry        BeskarYumRegistry `yaml:"registry"`
	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 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"`
}

type Plugin

type Plugin struct {
	Prefix    string          `yaml:"prefix"`
	Mediatype string          `yaml:"mediatype"`
	Backends  []PluginBackend `yaml:"backends"`
}

type PluginBackend

type PluginBackend struct {
	URL  string     `yaml:"url"`
	MTLS PluginMTLS `yaml:"mtls"`
}

type PluginMTLS

type PluginMTLS struct {
	Enabled bool   `yaml:"enabled"`
	CA      string `yaml:"ca-cert"`
	CAKey   string `yaml:"ca-key"`
}

Jump to

Keyboard shortcuts

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