config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// StoragePath is the path to the directory where artifacts will be stored.
	StoragePath string `json:"storagePath"`

	// StorageAddress is the host and port the server will bind to.
	StorageAddress string `json:"storageAddress"`

	// StorageAdvAddress is the in-cluster address the server will advertise to clients.
	StorageAdvAddress string `json:"storageAdvAddress"`

	// ArtifactRetentionTTL is the duration after which stale artifacts are garbage collected.
	ArtifactRetentionTTL time.Duration `json:"artifactRetentionTTL"`

	// ArtifactRetentionRecords is the maximum number of artifacts to be kept in storage after a garbage collection.
	ArtifactRetentionRecords int `json:"artifactRetentionRecords"`

	// ArtifactDigestAlgo is the hashing algorithm used to calculate the digest of artifacts.
	ArtifactDigestAlgo string `json:"artifactDigestAlgo"`
}

Options contains configuration settings for the artifact storage server.

func (*Options) BindFlags

func (o *Options) BindFlags(fs *pflag.FlagSet)

BindFlags will parse the given pflag.FlagSet for the controller and set the Options accordingly.

func (*Options) GetAdvertisedAddress

func (o *Options) GetAdvertisedAddress() (string, error)

GetAdvertisedAddress returns the address the artifact server will advertise to clients. If StorageAdvAddress is set, it is returned as is. Otherwise, it derives the advertised address from StorageAddress, replacing empty or wildcard hosts with the system's hostname.

Jump to

Keyboard shortcuts

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