Documentation
¶
Index ¶
- func CheckIfImageBuildPathsOnRunningMachine(ctx context.Context, containerFiles []string, options entities.BuildOptions) ([]string, entities.BuildOptions, bool)
- func FindMachineByPort(connectionURI string, parsedConnection *url.URL) (*vmconfigs.MachineConfig, vmconfigs.VMProvider, error)
- func IsHyperVProvider(ctx context.Context) (bool, error)
- func ValidatePathForLocalAPI(path string) error
- type LocalAPIMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfImageBuildPathsOnRunningMachine ¶
func CheckIfImageBuildPathsOnRunningMachine(ctx context.Context, containerFiles []string, options entities.BuildOptions) ([]string, entities.BuildOptions, bool)
CheckIfImageBuildPathsOnRunningMachine checks if the build context directory and all specified Containerfiles are available on the running machine. If they are, it translates their paths to the corresponding remote paths and returns them along with a flag indicating success.
func FindMachineByPort ¶
func FindMachineByPort(connectionURI string, parsedConnection *url.URL) (*vmconfigs.MachineConfig, vmconfigs.VMProvider, error)
FindMachineByPort finds a running machine that matches the given connection port. It returns the machine configuration and provider, or an error if not found.
func IsHyperVProvider ¶
IsHyperVProvider checks if the current machine provider is Hyper-V. It returns true if the provider is Hyper-V, false otherwise, or an error if the check fails.
func ValidatePathForLocalAPI ¶
ValidatePathForLocalAPI checks if the provided path satisfies requirements for local API usage. It returns an error if the path is not absolute or does not exist on the filesystem.
Types ¶
type LocalAPIMap ¶
type LocalAPIMap struct {
ClientPath string `json:"ClientPath,omitempty"`
RemotePath string `json:"RemotePath,omitempty"`
}
LocalAPIMap is a map of local paths to their target paths in the VM
func CheckPathOnRunningMachine ¶
func CheckPathOnRunningMachine(ctx context.Context, path string) (*LocalAPIMap, bool)
CheckPathOnRunningMachine is a convenience function that checks if a path is available on any currently running machine. It combines machine inspection and path checking.