Documentation
¶
Index ¶
- Constants
- Variables
- func Delete(config []byte, path string) ([]byte, error)
- func PortOffset(installationName string) int
- func PrintHelp(path string) error
- func ReadConfigFile(configPath string) ([]byte, error)
- func Upsert(config []byte, path, value string) ([]byte, error)
- func WriteConfigFile(configPath string, data []byte) error
- type Config
- type GitConfig
- type GlobalConfig
Constants ¶
View Source
const ( // DefaultLocalRegistryPort is the default user-facing port for the local registry used for exports. DefaultLocalRegistryPort = 8371 // DefaultDarwinProxyImage is the image tag used for the Docker Desktop registry proxy on Darwin. DefaultDarwinProxyImage = "alpine/socat:1.7.4.4" // DefaultDarwinProxyWait is the maximum time to wait for the Darwin registry proxy support container // to become available. DefaultDarwinProxyWait = 10 * time.Second // DefaultBuildkitScheme is the default scheme earthly uses to connect to its buildkitd. tcp or docker-container. DefaultBuildkitScheme = "docker-container" // DefaultConversionParallelism is the default conversion parallelism that // EarthBuild uses internally to generate LLB for BuildKit to consume. DefaultConversionParallelism = 10 // DefaultBuildkitMaxParallelism is the default max parallelism for buildkit workers. DefaultBuildkitMaxParallelism = 20 // DefaultCACert is the default path to use when looking for a CA cert to use for TLS. DefaultCACert = "./certs/ca_cert.pem" // DefaultCAKey is the default path to use when looking for a CA key to use for TLS cert generation. DefaultCAKey = "./certs/ca_key.pem" // DefaultClientTLSCert is the default path to use when looking for the Earthly TLS cert. DefaultClientTLSCert = "./certs/earthly_cert.pem" // DefaultClientTLSKey is the default path to use when looking for the Earthly TLS key. DefaultClientTLSKey = "./certs/earthly_key.pem" // DefaultServerTLSCert is the default path to use when looking for the Buildkit TLS cert. DefaultServerTLSCert = "./certs/buildkit_cert.pem" // DefaultServerTLSKey is the default path to use when looking for the Buildkit TLS key. DefaultServerTLSKey = "./certs/buildkit_key.pem" // DefaultContainerFrontend is the default frontend program or interfacing with // the running containers and saved images. DefaultContainerFrontend = "auto" )
Variables ¶
View Source
var ( // ErrInvalidTransport occurs when a URL transport type is invalid. ErrInvalidTransport = errors.Errorf("invalid transport") // ErrInvalidAuth occurs when the auth type is invalid. ErrInvalidAuth = errors.Errorf("invalid auth") )
Functions ¶
func Delete ¶
Delete removes the key and value at the specified path. If no key/value exists, the function will eventually return cleanly.
func PortOffset ¶
PortOffset is the offset to use for dev ports.
func PrintHelp ¶
PrintHelp describes the provided config option by printing its type and help tags to the console.
func ReadConfigFile ¶
ReadConfigFile reads in the config file from the disk, into a byte slice.
func Upsert ¶
Upsert adds or modifies the key to be the specified value. This is saved to disk in your earthly config file.
func WriteConfigFile ¶
WriteConfigFile writes the config file to disk with preset permission 0644.
Types ¶
type Config ¶
type Config struct {
Git map[string]GitConfig `help:"Git configuration object. Requires YAML literal to set directly." yaml:"git"`
Global GlobalConfig `help:"Global configuration object. Requires YAML literal to set directly." yaml:"global"`
}
Config contains user's configuration values from ~/earthly/config.yml.
type GitConfig ¶
type GitConfig struct {
StrictHostKeyChecking *bool `` //nolint:lll
/* 311-byte string literal not displayed */
Pattern string `` //nolint:lll
/* 294-byte string literal not displayed */
Substitute string `` //nolint:lll
/* 297-byte string literal not displayed */
Suffix string `` //nolint:lll // .git
/* 293-byte string literal not displayed */
Auth string `` //nolint:lll // http, https, ssh
/* 291-byte string literal not displayed */
User string `` //nolint:lll
/* 291-byte string literal not displayed */
Prefix string `` //nolint:lll
/* 293-byte string literal not displayed */
Password string `` //nolint:lll
/* 295-byte string literal not displayed */
ServerKey string `` //nolint:lll
/* 296-byte string literal not displayed */
SSHCommand string `` //nolint:lll
/* 298-byte string literal not displayed */
Port int `` //nolint:lll
/* 291-byte string literal not displayed */
}
GitConfig contains git-specific config values.
type GlobalConfig ¶
type GlobalConfig struct {
DarwinProxyImage string `` //nolint:lll
/* 182-byte string literal not displayed */
ServerTLSKey string `` //nolint:lll
/* 180-byte string literal not displayed */
BuildkitScheme string `` //nolint:lll
/* 182-byte string literal not displayed */
BuildkitImage string `` //nolint:lll
/* 178-byte string literal not displayed */
CachePath string `` //nolint:lll
/* 174-byte string literal not displayed */
SecretProvider string `` //nolint:lll
/* 179-byte string literal not displayed */
BuildkitAdditionalConfig string `` //nolint:lll
/* 190-byte string literal not displayed */
IPTables string `` //nolint:lll
/* 173-byte string literal not displayed */
ContainerFrontend string `` //nolint:lll
/* 182-byte string literal not displayed */
ServerTLSCert string `` //nolint:lll
/* 181-byte string literal not displayed */
BuildkitHost string `` //nolint:lll
/* 177-byte string literal not displayed */
TLSCACert string `` //nolint:lll
/* 169-byte string literal not displayed */
ClientTLSKey string `` //nolint:lll
/* 170-byte string literal not displayed */
GitImage string `` //nolint:lll
/* 173-byte string literal not displayed */
LocalRegistryHost string `` //nolint:lll
/* 183-byte string literal not displayed */
TLSCAKey string `` //nolint:lll
/* 173-byte string literal not displayed */
ClientTLSCert string `` //nolint:lll
/* 171-byte string literal not displayed */
BuildkitAdditionalArgs []string `` //nolint:lll
/* 188-byte string literal not displayed */
BuildkitCacheSizePct int `` //nolint:lll
/* 178-byte string literal not displayed */
BuildkitCacheSizeMb int `` //nolint:lll
/* 177-byte string literal not displayed */
ConversionParallelism int `` //nolint:lll
/* 186-byte string literal not displayed */
BuildkitMaxParallelism int `` //nolint:lll
/* 188-byte string literal not displayed */
DarwinProxyWait time.Duration `` //nolint:lll
/* 181-byte string literal not displayed */
BuildkitRestartTimeoutS int `` //nolint:lll
/* 190-byte string literal not displayed */
BuildkitCacheKeepDurationS int `` //nolint:lll
/* 194-byte string literal not displayed */
CniMtu uint16 `` //nolint:lll
/* 171-byte string literal not displayed */
TLSEnabled bool `` //nolint:lll
/* 175-byte string literal not displayed */
}
GlobalConfig contains global config values.
Click to show internal directories.
Click to hide internal directories.