edges

package
v0.0.1-prerelease9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkipped = errors.New("skipped performing")

ErrSkipped is returned when an edge skips performing because the operation would be a no-op.

Functions

This section is empty.

Types

type PromotionEdge

type PromotionEdge[R core.Resource] struct {
	// contains filtered or unexported fields
}

PromotionEdge is a type edge implementation which supports promoting from a source phase to a destination phase.

func Promotes

func Promotes[R core.Resource](from typed.Phase[R], to typed.UpdatablePhase[R]) *PromotionEdge[R]

func (*PromotionEdge[R]) CanPerform

func (s *PromotionEdge[R]) CanPerform(ctx context.Context) (bool, error)

func (*PromotionEdge[R]) From

func (s *PromotionEdge[R]) From() core.Descriptor

func (*PromotionEdge[R]) Kind

func (s *PromotionEdge[R]) Kind() string

func (*PromotionEdge[R]) Perform

func (s *PromotionEdge[R]) Perform(ctx context.Context) (r *core.Result, err error)

Perform causes a promotion from a dependent to a target phase. The phase fetches both its current resource state, and that of the promotion source phase. If the resources differ, then the phase updates its source to match the promoted version.

func (*PromotionEdge[R]) To

func (s *PromotionEdge[R]) To() core.Descriptor

Jump to

Keyboard shortcuts

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