config

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigType   = "blobLimits.ocireg.ocm" + cfgcpi.OCM_CONFIG_TYPE_SUFFIX
	ConfigTypeV1 = ConfigType + runtime.VersionSeparator + "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobLimits

type BlobLimits map[string]int64

func (BlobLimits) GetLimit

func (b BlobLimits) GetLimit(hostport string) int64

type Config

type Config struct {
	runtime.ObjectVersionedType `json:",inline"`
	// BlobLimits describe the limit setting for host:port
	// entries. As a special case (for testing) it is possible
	// to configure limits for CTF, also, by using "@"+filepath.
	BlobLimits BlobLimits `json:"blobLimits"`
}

Config describes a memory based config interface for configuring blob limits for underlying OCI manifest layers.

func New

func New() *Config

New creates a blob limit ConfigSpec.

func (*Config) AddLimit

func (a *Config) AddLimit(hostport string, limit int64)

func (*Config) ApplyTo

func (a *Config) ApplyTo(ctx config.Context, target interface{}) error

func (*Config) GetType

func (a *Config) GetType() string

type Configurable

type Configurable interface {
	ConfigureBlobLimits(limits BlobLimits)
}

Jump to

Keyboard shortcuts

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