plan

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CascadePlanID is the id for the cascade plan
	CascadePlanID = "cascade"
	// SinglePlanID is the id for the single plan
	SinglePlanID = "single"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePlan

type BasePlan struct {
	// contains filtered or unexported fields
}

BasePlan is the base plan which all plans should extend

type CascadePlan

type CascadePlan struct {
	BasePlan
	// contains filtered or unexported fields
}

CascadePlan is the plan used to cascade build

func NewCascadePlan

func NewCascadePlan(imagesStorer repository.ImagesStorerReader, depth int) *CascadePlan

NewCascadePlan creates a new CascadePlan

func (*CascadePlan) Plan

func (p *CascadePlan) Plan(name string, versions []string) ([]*Step, error)

Plan return a list of images to build

type MockPlan

type MockPlan struct {
	mock.Mock
}

MockPlan is a mock of Plan interface

func NewMockPlan

func NewMockPlan() *MockPlan

NewMockPlan returns a new MockPlan

func (*MockPlan) Plan

func (p *MockPlan) Plan(name string, version []string) ([]*Step, error)

Plan mock

type MockPlanFactory

type MockPlanFactory struct {
	mock.Mock
}

MockPlanFactory is a factory to create Planner

func NewMockPlanFactory

func NewMockPlanFactory() *MockPlanFactory

NewMockPlanFactory creates a new MockPlanFactory

func (*MockPlanFactory) NewPlan

func (f *MockPlanFactory) NewPlan(id string, parameters map[string]interface{}) (Planner, error)

NewPlan provides a mock function with given fields: id, parameters

type PlanFactory

type PlanFactory struct {
	// contains filtered or unexported fields
}

PlanFactory is a factory to create Planner

func NewPlanFactory

func NewPlanFactory(store repository.ImagesStorerReader) *PlanFactory

NewPlanFactory creates a new PlanFactory

func (*PlanFactory) NewPlan

func (f *PlanFactory) NewPlan(id string, parameters map[string]interface{}) (Planner, error)

NewPlan creates a new Planner

type Planner

type Planner interface {
	Plan(name string, versions []string) ([]*Step, error)
}

Planner interfaces defines the storage of images

type SinglePlan

type SinglePlan struct {
	BasePlan
}

SinglePlan is a build plan

func NewSinglePlan

func NewSinglePlan(imagesStorer repository.ImagesStorerReader) *SinglePlan

NewSinglePlan returns a new SinglePlan

func (*SinglePlan) Plan

func (p *SinglePlan) Plan(name string, versions []string) ([]*Step, error)

Plan return a list of images to build

type Step

type Step struct {
	// contains filtered or unexported fields
}

Step is a plan step

func NewStep

func NewStep(image *image.Image, desc string, sync chan struct{}) *Step

NewStep returns a new instance of the Step

func (*Step) Image

func (p *Step) Image() *image.Image

Image returns the image to build

func (*Step) Notify

func (p *Step) Notify()

Notify notifies the notify channels

func (*Step) Subscribe

func (p *Step) Subscribe(sync chan struct{}) error

Subscribe adds a channel to the list of channels to notify

func (*Step) Wait

func (p *Step) Wait()

Wait blocks Step until it is notified

Jump to

Keyboard shortcuts

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