edges

package
v0.0.1-prerelease7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Phase

type Phase[R core.Resource] interface {
	core.Phase
	GetResource(_ context.Context) (R, error)
}

Phase is an interface around storage for resources.

type PromotionEdge

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

func Promotes

func Promotes[R core.Resource](from Phase[R], to 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

type UpdatablePhase

type UpdatablePhase[R core.Resource] interface {
	Phase[R]
	Update(_ context.Context, to R) (map[string]string, error)
}

UpdatablePhase is a source through which the phase can promote resources to new versions

Jump to

Keyboard shortcuts

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