ifc

package
v0.0.0-...-b8e83fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	PhaseByID(ID) (Phase, error)
	PlanByID(ID) (Plan, error)
	PhaseByAPIObj(*v1alpha1.Phase) (Phase, error)
	ClusterMap() (clustermap.ClusterMap, error)
}

Client is a phase client that can be used by command line or ui packages

type Executor

type Executor interface {
	Run(RunOptions) error
	Render(io.Writer, RenderOptions) error
	Validate() error
	Status() (ExecutorStatus, error)
}

Executor interface should be implemented by each runner

type ExecutorConfig

type ExecutorConfig struct {
	PhaseName    string
	ClusterName  string
	SinkBasePath string
	TargetPath   string

	ClusterMap        clustermap.ClusterMap
	ExecutorDocument  document.Document
	KubeConfig        kubeconfig.Interface
	BundleFactory     document.BundleFactoryFunc
	PhaseConfigBundle document.Bundle
	Inventory         inventoryifc.Inventory
	ContainerFunc     container.ClientV1Alpha1FactoryFunc
}

ExecutorConfig container to store all executor options

type ExecutorFactory

type ExecutorFactory func(config ExecutorConfig) (Executor, error)

ExecutorFactory for executor instantiation

type ExecutorStatus

type ExecutorStatus struct{}

ExecutorStatus is a struct which defines the status

type Helper

type Helper interface {
	TargetPath() string
	PhaseRepoDir() string
	DocEntryPointPrefix() string
	WorkDir() string
	Phase(phaseID ID) (*v1alpha1.Phase, error)
	Plan(planID ID) (*v1alpha1.PhasePlan, error)
	ListPhases(o ListPhaseOptions) ([]*v1alpha1.Phase, error)
	ListPlans() ([]*v1alpha1.PhasePlan, error)
	ClusterMapAPIobj() (*v1alpha1.ClusterMap, error)
	ClusterMap() (clustermap.ClusterMap, error)
	ExecutorDoc(phaseID ID) (document.Document, error)
	PhaseBundleRoot() string
	Inventory() ifc.Inventory
	PhaseEntryPointBasePath() string
	PhaseConfigBundle() document.Bundle
}

Helper is a phase helper that provides phases with additional config related information

type ID

type ID struct {
	Name      string
	Namespace string
}

ID uniquely identifies the phase

type ListPhaseOptions

type ListPhaseOptions struct {
	ClusterName string
	PlanID      ID
}

ListPhaseOptions is used to filter phases

type Phase

type Phase interface {
	Validate() error
	Run(RunOptions) error
	DocumentRoot() (string, error)
	Details() (string, error)
	Executor() (Executor, error)
	Render(io.Writer, bool, RenderOptions) error
	Status() (PhaseStatus, error)
}

Phase provides a way to interact with a phase

type PhaseStatus

type PhaseStatus struct {
	ExecutorStatus ExecutorStatus
}

PhaseStatus is a struct which defines status of phase

type Plan

type Plan interface {
	Validate() error
	Run(PlanRunOptions) error
	Status(StatusOptions) (PlanStatus, error)
}

Plan provides a way to interact with phase plans

type PlanRunOptions

type PlanRunOptions struct {
	RunOptions
	ResumeFromPhase string
}

PlanRunOptions holds options for plan run method

type PlanStatus

type PlanStatus struct{}

PlanStatus is a struct which defines status of PLAN

type RenderOptions

type RenderOptions struct {
	FilterSelector document.Selector
}

RenderOptions holds options for render method

type RunOptions

type RunOptions struct {
	DryRun  bool
	Timeout *time.Duration
}

RunOptions holds options for run method

type StatusOptions

type StatusOptions struct{}

StatusOptions is used to define status options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL