Documentation ¶
Index ¶
Constants ¶
View Source
const ( RegistryDirName = "registry" RootfsCacheDirName = "image" RegistryCacheDirName = "registry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterImageMountInfo ¶
type DistributeOption ¶ added in v0.10.0
type DistributeOption struct { //IgnoreCache: indicate that whether sealer use cache when distribute sealer image, //if not, will force sync sealer rootfs. //default is false. IgnoreCache bool // Prune: if it is true, will delete all cluster rootfs // default is false. Prune bool }
DistributeOption :control some distribute logic.
type Distributor ¶
type Distributor interface { // Distribute each files under mounted cluster image directory to target hosts. Distribute(hosts []net.IP, dest string) error // DistributeRegistry each files under registry directory to target hosts. DistributeRegistry(deployHosts []net.IP, dataDir string) error // Restore will do some clean works via infra driver, like delete rootfs. Restore(targetDir string, hosts []net.IP) error }
func NewScpDistributor ¶
func NewScpDistributor(imageMountInfo []ClusterImageMountInfo, driver infradriver.InfraDriver, configs []v1.Config, options DistributeOption) (Distributor, error)
type ImagerMounter ¶
type ImagerMounter struct { Mounter // contains filtered or unexported fields }
func NewImageMounter ¶
func NewImageMounter(imageEngine imageengine.Interface, hostsPlatform map[v1.Platform][]net.IP) (*ImagerMounter, error)
func (ImagerMounter) Mount ¶
func (c ImagerMounter) Mount(imageName string) ([]ClusterImageMountInfo, error)
func (ImagerMounter) Umount ¶
func (c ImagerMounter) Umount(imageName string, imageMountInfo []ClusterImageMountInfo) error
type Mounter ¶
type Mounter interface { //Mount sealer image with specified platform, return mount Dir,container ID,image ID and err. Mount(imageName string, platform v1.Platform, dest string) (string, string, string, error) //Umount :delete all mounted directory and remove related working container. Umount(dir, containerID string) error }
func NewBuildAhMounter ¶
func NewBuildAhMounter(imageEngine imageengine.Interface) Mounter
Click to show internal directories.
Click to hide internal directories.