config

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 9 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 {
	Server ServerConfig `yaml:"server"`
	Metric MetricConfig `yaml:"metric"`

	Provider  ProviderConfig  `yaml:"provider"`
	Converter ConverterConfig `yaml:"converter"`
}

func Parse

func Parse(configPath string) (*Config, error)

func (*Config) EnableRemoteCache added in v0.2.7

func (cfg *Config) EnableRemoteCache() bool

func (*Config) Host added in v0.2.0

func (cfg *Config) Host(ref string) (remote.CredentialFunc, bool, error)

type ConversionRule

type ConversionRule struct {
	TagSuffix string `yaml:"tag_suffix"`
	CacheTag  string `yaml:"cache_tag"`
}

type ConverterConfig

type ConverterConfig struct {
	Worker           int              `yaml:"worker"`
	Driver           DriverConfig     `yaml:"driver"`
	HarborAnnotation bool             `yaml:"harbor_annotation"`
	Platforms        string           `yaml:"platforms"`
	Rules            []ConversionRule `yaml:"rules"`
}

type DriverConfig

type DriverConfig struct {
	Type   string            `yaml:"type"`
	Config map[string]string `yaml:"config"`
}

type GCPolicy added in v0.2.5

type GCPolicy struct {
	Threshold string `yaml:"threshold"`
}

type MetricConfig

type MetricConfig struct {
	Enabled bool `yaml:"enabled"`
}

type ProviderConfig

type ProviderConfig struct {
	Source       map[string]SourceConfig `yaml:"source"`
	WorkDir      string                  `yaml:"work_dir"`
	GCPolicy     GCPolicy                `yaml:"gcpolicy"`
	CacheSize    int                     `yaml:"cache_size"`
	CacheVersion string                  `yaml:"cache_version"`
}

type ServerConfig

type ServerConfig struct {
	Name string `yaml:"name"`
	Uds  string `yaml:"uds"`
	Host string `yaml:"host"`
	Port string `yaml:"port"`
}

type SourceConfig

type SourceConfig struct {
	Auth     string  `yaml:"auth"`
	Insecure bool    `yaml:"insecure"`
	Webhook  Webhook `yaml:"webhook"`
}

type Webhook

type Webhook struct {
	AuthHeader string `yaml:"auth_header"`
}

Jump to

Keyboard shortcuts

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