builder

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildFunc added in v0.100.0

type BuildFunc func(context.Context, int, holos.Component) error

BuildFunc is executed concurrently when processing platform components.

type BuildPlan added in v0.100.0

type BuildPlan struct {
	holos.BuildPlan
}

func LoadBuildPlan added in v0.100.0

func LoadBuildPlan(i *Instance, opts holos.BuildOpts) (bp BuildPlan, err error)

type Instance added in v0.100.0

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

Instance represents a cue instance to build. Use LoadInstance to create a new Instance.

func LoadInstance added in v0.100.0

func LoadInstance(path string, tags []string) (*Instance, error)

func (*Instance) Decoder added in v0.100.0

func (i *Instance) Decoder() (*json.Decoder, error)

func (*Instance) Discriminate added in v0.100.0

func (i *Instance) Discriminate(discriminate func(tm holos.TypeMeta) error) error

Discriminate calls the discriminate func for side effects. Useful to switch over the instance kind and apiVersion.

func (*Instance) Export added in v0.100.0

func (i *Instance) Export(enc holos.Encoder) error

func (*Instance) HolosValue added in v0.100.0

func (i *Instance) HolosValue() (v cue.Value, err error)

HolosValue returns the value of the holos field of the exported CUE instance.

type Platform added in v0.100.0

type Platform struct {
	holos.Platform
}

Platform represents a common abstraction over different platform schema versions.

func LoadPlatform added in v0.100.0

func LoadPlatform(i *Instance) (platform Platform, err error)

func (*Platform) Build added in v0.100.0

func (p *Platform) Build(ctx context.Context, opts PlatformOpts) error

Build calls PlatformOpts Fn(ctx, component) concurrently.

type PlatformOpts added in v0.100.0

type PlatformOpts struct {
	Fn          BuildFunc
	Selector    holos.Selector
	Concurrency int
	InfoEnabled bool
}

PlatformOpts represents build options when processing the components in a platform.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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