Documentation ¶
Index ¶
- Constants
- Variables
- func FixupServices(ctx context.Context, provider client.Provider, project *types.Project, ...) error
- func GetNumOfGPUs(ctx context.Context, project *composeTypes.Project) int
- func NormalizeServiceName(s string) string
- func ValidateManagedStore(managedStore any) error
- func ValidateProject(project *composeTypes.Project) error
- func ValidateProjectConfig(ctx context.Context, composeProject *composeTypes.Project, ...) error
- func ValidateService(service *types.ServiceConfig) error
- func WalkContextFolder(root, dockerfile string, ...) error
- type ErrMissingConfig
- type FixupTarget
- type ListConfigNamesFunc
- type Loader
- type LoaderOption
- type LoaderOptions
- type Project
- type ServiceConfig
- type ServiceNameReplacer
- type Services
- type UploadMode
Constants ¶
View Source
const ( MiB = 1024 * 1024 ContextFileLimit = 100 ContextSizeSoftLimit = 10 * MiB ContextSizeHardLimit = 100 * MiB )
View Source
const Mode_HOST = "host"
View Source
const Mode_INGRESS = "ingress"
View Source
const NetworkPublic = "public"
HACK: Use magic network name "public" to determine if the service is public
View Source
const Protocol_TCP = "tcp"
View Source
const Protocol_UDP = "udp"
Variables ¶
View Source
var ErrDockerfileNotFound = errors.New("dockerfile not found")
Functions ¶
func FixupServices ¶
func GetNumOfGPUs ¶
func GetNumOfGPUs(ctx context.Context, project *composeTypes.Project) int
func NormalizeServiceName ¶
func ValidateManagedStore ¶
func ValidateProject ¶
func ValidateProject(project *composeTypes.Project) error
func ValidateProjectConfig ¶
func ValidateProjectConfig(ctx context.Context, composeProject *composeTypes.Project, listConfigNamesFunc ListConfigNamesFunc) error
func ValidateService ¶
func ValidateService(service *types.ServiceConfig) error
Types ¶
type ErrMissingConfig ¶
type ErrMissingConfig []string
func (ErrMissingConfig) Error ¶
func (e ErrMissingConfig) Error() string
type FixupTarget ¶
type FixupTarget string
const ( BuildArgs FixupTarget = "build argument" EnvironmentVars FixupTarget = "environment variable" )
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func NewLoader ¶
func NewLoader(opts ...LoaderOption) *Loader
type LoaderOption ¶
type LoaderOption func(*LoaderOptions)
func WithPath ¶
func WithPath(paths ...string) LoaderOption
func WithProjectName ¶
func WithProjectName(name string) LoaderOption
type LoaderOptions ¶
type Project ¶
type Project = composeTypes.Project
type ServiceConfig ¶
type ServiceConfig = composeTypes.ServiceConfig
type ServiceNameReplacer ¶
type ServiceNameReplacer struct {
// contains filtered or unexported fields
}
func NewServiceNameReplacer ¶
func NewServiceNameReplacer(provider client.Provider, services composeTypes.Services) ServiceNameReplacer
func (*ServiceNameReplacer) HasServiceName ¶
func (s *ServiceNameReplacer) HasServiceName(name string) bool
func (*ServiceNameReplacer) ReplaceServiceNameWithDNS ¶
func (s *ServiceNameReplacer) ReplaceServiceNameWithDNS(serviceName string, key, value string, fixupTarget FixupTarget) string
type Services ¶
type Services = composeTypes.Services
type UploadMode ¶
type UploadMode int
const ( UploadModeDigest UploadMode = iota // the default: calculate the digest of the tarball so we can skip building the same image twice UploadModeForce // force: always upload the tarball, even if it's the same as a previous one UploadModeIgnore // dry-run: don't upload the tarball, just return the path UploadModePreview // preview: like dry-run but does start the preview command )
Click to show internal directories.
Click to hide internal directories.