Documentation
¶
Index ¶
- Constants
- Variables
- func ConfirmDeleteNodes() error
- func GetCommands(ctx context.Context) []string
- func GetEnvs(ctx context.Context) map[string]string
- func IsRunGuestFailed(err error) bool
- func MirrorRegistry(cluster *v2.Cluster, mounts []v2.MountImage) error
- func MountClusterImages(bdah buildah.Interface, cluster *v2.Cluster, skipApp bool) error
- func NewCheckError(err error) error
- func NewPreProcessError(err error) error
- func OCIToImageMount(inspector imageInspector, mount *v2.MountImage) error
- func SyncClusterStatus(cluster *v2.Cluster, bdah buildah.Interface, reset bool) error
- func SyncNewVersionConfig(clusterName string)
- func WithCommands(ctx context.Context, commands []string) context.Context
- func WithEnvs(ctx context.Context, envs map[string]string) context.Context
- type CheckError
- type CreateProcessor
- func (c *CreateProcessor) Bootstrap(cluster *v2.Cluster) error
- func (c *CreateProcessor) Check(cluster *v2.Cluster) error
- func (c *CreateProcessor) Execute(cluster *v2.Cluster) error
- func (c *CreateProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
- func (c *CreateProcessor) Init(_ *v2.Cluster) error
- func (c *CreateProcessor) Join(cluster *v2.Cluster) error
- func (c *CreateProcessor) MirrorRegistry(cluster *v2.Cluster) error
- func (c *CreateProcessor) MountRootfs(cluster *v2.Cluster) error
- func (c *CreateProcessor) PreProcess(cluster *v2.Cluster) error
- func (c *CreateProcessor) RunConfig(cluster *v2.Cluster) error
- func (c *CreateProcessor) RunGuest(cluster *v2.Cluster) error
- type DeleteProcessor
- func (d *DeleteProcessor) CleanFS(cluster *v2.Cluster) error
- func (d DeleteProcessor) Execute(cluster *v2.Cluster) (err error)
- func (d DeleteProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
- func (d *DeleteProcessor) PreProcess(cluster *v2.Cluster) error
- func (d *DeleteProcessor) Reset(cluster *v2.Cluster) error
- func (d *DeleteProcessor) UnMountImage(cluster *v2.Cluster) error
- func (d *DeleteProcessor) UnMountRootfs(cluster *v2.Cluster) error
- func (d *DeleteProcessor) UndoBootstrap(cluster *v2.Cluster) error
- type InstallProcessor
- func (c *InstallProcessor) ConfirmOverrideApps(_ *v2.Cluster) error
- func (c *InstallProcessor) Execute(cluster *v2.Cluster) error
- func (c *InstallProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
- func (c *InstallProcessor) MirrorRegistry(cluster *v2.Cluster) error
- func (c *InstallProcessor) MountRootfs(cluster *v2.Cluster) error
- func (c *InstallProcessor) PostProcess(*v2.Cluster) error
- func (c *InstallProcessor) PreProcess(cluster *v2.Cluster) error
- func (c *InstallProcessor) RunConfig(_ *v2.Cluster) error
- func (c *InstallProcessor) RunGuest(cluster *v2.Cluster) error
- func (c *InstallProcessor) SyncStatusAndCheck(_ *v2.Cluster) error
- func (c *InstallProcessor) UpgradeIfNeed(cluster *v2.Cluster) error
- type Interface
- func NewCreateProcessor(ctx context.Context, name string, clusterFile clusterfile.Interface) (Interface, error)
- func NewDeleteProcessor(name string, clusterFile clusterfile.Interface) (Interface, error)
- func NewInstallProcessor(ctx context.Context, clusterFile clusterfile.Interface, images []string) (Interface, error)
- func NewScaleProcessor(clusterFile clusterfile.Interface, name string, images v2.ImageList, ...) (Interface, error)
- type PreProcessError
- type ScaleProcessor
- func (c *ScaleProcessor) Bootstrap(cluster *v2.Cluster) error
- func (c *ScaleProcessor) Delete(cluster *v2.Cluster) error
- func (c *ScaleProcessor) DeleteCheck(cluster *v2.Cluster) error
- func (c *ScaleProcessor) Execute(cluster *v2.Cluster) error
- func (c *ScaleProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
- func (c *ScaleProcessor) Join(cluster *v2.Cluster) error
- func (c *ScaleProcessor) JoinCheck(cluster *v2.Cluster) error
- func (c *ScaleProcessor) MountRootfs(cluster *v2.Cluster) error
- func (c *ScaleProcessor) PreProcess(cluster *v2.Cluster) error
- func (c *ScaleProcessor) PreProcessImage(cluster *v2.Cluster) error
- func (c *ScaleProcessor) RunConfig(cluster *v2.Cluster) error
- func (c *ScaleProcessor) RunGuest(cluster *v2.Cluster) error
- func (c ScaleProcessor) UnMountRootfs(cluster *v2.Cluster) error
- func (c *ScaleProcessor) UndoBootstrap(_ *v2.Cluster) error
Constants ¶
View Source
const (
RunGuestFailed = "RunGuestFailed"
)
Variables ¶
View Source
var ErrCancelled = errors.New("cancelled")
View Source
var ForceDelete bool
View Source
var ForceOverride bool
Functions ¶
func ConfirmDeleteNodes ¶
func ConfirmDeleteNodes() error
func GetCommands ¶
func IsRunGuestFailed ¶
func MirrorRegistry ¶
func MirrorRegistry(cluster *v2.Cluster, mounts []v2.MountImage) error
func MountClusterImages ¶
func NewCheckError ¶
func NewPreProcessError ¶
func OCIToImageMount ¶
func OCIToImageMount(inspector imageInspector, mount *v2.MountImage) error
func SyncClusterStatus ¶
func SyncNewVersionConfig ¶
func SyncNewVersionConfig(clusterName string)
compatible with older sealos versions
Types ¶
type CheckError ¶
type CheckError struct {
// contains filtered or unexported fields
}
func (*CheckError) Error ¶
func (e *CheckError) Error() string
type CreateProcessor ¶
type CreateProcessor struct { ClusterFile clusterfile.Interface Buildah buildah.Interface Runtime runtime.Interface Guest guest.Interface ExtraEnvs map[string]string // parsing from CLI arguments }
func (*CreateProcessor) GetPipeLine ¶
func (c *CreateProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
func (*CreateProcessor) MirrorRegistry ¶
func (c *CreateProcessor) MirrorRegistry(cluster *v2.Cluster) error
func (*CreateProcessor) MountRootfs ¶
func (c *CreateProcessor) MountRootfs(cluster *v2.Cluster) error
func (*CreateProcessor) PreProcess ¶
func (c *CreateProcessor) PreProcess(cluster *v2.Cluster) error
type DeleteProcessor ¶
type DeleteProcessor struct { Buildah buildah.Interface ClusterFile clusterfile.Interface }
func (DeleteProcessor) Execute ¶
func (d DeleteProcessor) Execute(cluster *v2.Cluster) (err error)
Execute :according to the different of desired cluster to delete cluster.
func (DeleteProcessor) GetPipeLine ¶
func (d DeleteProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
func (*DeleteProcessor) PreProcess ¶
func (d *DeleteProcessor) PreProcess(cluster *v2.Cluster) error
func (*DeleteProcessor) UnMountImage ¶
func (d *DeleteProcessor) UnMountImage(cluster *v2.Cluster) error
func (*DeleteProcessor) UnMountRootfs ¶
func (d *DeleteProcessor) UnMountRootfs(cluster *v2.Cluster) error
func (*DeleteProcessor) UndoBootstrap ¶
func (d *DeleteProcessor) UndoBootstrap(cluster *v2.Cluster) error
type InstallProcessor ¶
type InstallProcessor struct { ClusterFile clusterfile.Interface Buildah buildah.Interface Runtime runtime.Interface Guest guest.Interface NewMounts []v2.MountImage NewImages []string ExtraEnvs map[string]string // parsing from CLI arguments // contains filtered or unexported fields }
func (*InstallProcessor) ConfirmOverrideApps ¶
func (c *InstallProcessor) ConfirmOverrideApps(_ *v2.Cluster) error
func (*InstallProcessor) GetPipeLine ¶
func (c *InstallProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
func (*InstallProcessor) MirrorRegistry ¶
func (c *InstallProcessor) MirrorRegistry(cluster *v2.Cluster) error
func (*InstallProcessor) MountRootfs ¶
func (c *InstallProcessor) MountRootfs(cluster *v2.Cluster) error
func (*InstallProcessor) PostProcess ¶
func (c *InstallProcessor) PostProcess(*v2.Cluster) error
func (*InstallProcessor) PreProcess ¶
func (c *InstallProcessor) PreProcess(cluster *v2.Cluster) error
func (*InstallProcessor) SyncStatusAndCheck ¶
func (c *InstallProcessor) SyncStatusAndCheck(_ *v2.Cluster) error
func (*InstallProcessor) UpgradeIfNeed ¶
func (c *InstallProcessor) UpgradeIfNeed(cluster *v2.Cluster) error
type Interface ¶
type Interface interface { // Execute :according to the difference of desired cluster to do cluster apply. Execute(cluster *v2.Cluster) error }
func NewCreateProcessor ¶
func NewDeleteProcessor ¶
func NewDeleteProcessor(name string, clusterFile clusterfile.Interface) (Interface, error)
func NewInstallProcessor ¶
func NewScaleProcessor ¶
type PreProcessError ¶
type PreProcessError struct {
// contains filtered or unexported fields
}
func (*PreProcessError) Error ¶
func (e *PreProcessError) Error() string
type ScaleProcessor ¶
type ScaleProcessor struct { ClusterFile clusterfile.Interface Runtime runtime.Interface Buildah buildah.Interface MastersToJoin []string MastersToDelete []string NodesToJoin []string NodesToDelete []string IsScaleUp bool Guest guest.Interface // contains filtered or unexported fields }
func (*ScaleProcessor) DeleteCheck ¶
func (c *ScaleProcessor) DeleteCheck(cluster *v2.Cluster) error
func (*ScaleProcessor) GetPipeLine ¶
func (c *ScaleProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error)
func (*ScaleProcessor) MountRootfs ¶
func (c *ScaleProcessor) MountRootfs(cluster *v2.Cluster) error
func (*ScaleProcessor) PreProcess ¶
func (c *ScaleProcessor) PreProcess(cluster *v2.Cluster) error
func (*ScaleProcessor) PreProcessImage ¶
func (c *ScaleProcessor) PreProcessImage(cluster *v2.Cluster) error
func (ScaleProcessor) UnMountRootfs ¶
func (c ScaleProcessor) UnMountRootfs(cluster *v2.Cluster) error
func (*ScaleProcessor) UndoBootstrap ¶
func (c *ScaleProcessor) UndoBootstrap(_ *v2.Cluster) error
Click to show internal directories.
Click to hide internal directories.