farm

package
v5.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Farm

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

Farm represents a group of connections to builders.

func NewFarm

func NewFarm(ctx context.Context, name string, localEngine entities.ImageEngine, buildLocal bool) (*Farm, error)

func (*Farm) Build

func (f *Farm) Build(ctx context.Context, schedule Schedule, options entities.BuildOptions, reference string, localEngine entities.ImageEngine) error

Build runs a build using the specified targetplatform:service map. If all builds succeed, it copies the resulting images from the remote hosts to the local service and builds a manifest list with the specified reference name.

func (*Farm) Done

func (f *Farm) Done(ctx context.Context) error

Done performs any necessary end-of-process cleanup for the farm's members.

func (*Farm) EmulatedPlatforms

func (f *Farm) EmulatedPlatforms(ctx context.Context) ([]string, error)

EmulatedPlatforms returns a list of the set of platforms for which the farm can build images with the help of emulation.

func (*Farm) NativePlatforms

func (f *Farm) NativePlatforms(ctx context.Context) ([]string, error)

NativePlatforms returns a list of the set of platforms for which the farm can build images natively.

func (*Farm) Schedule

func (f *Farm) Schedule(ctx context.Context, platforms []string) (Schedule, error)

Schedule takes a list of platforms and returns a list of connections which can be used to build for those platforms. It always prefers native builders over emulated builders, but will assign a builder which can use emulation for a platform if no suitable native builder is available.

If platforms is an empty list, all available native platforms will be scheduled.

TODO: add (Priority,Weight *int) a la RFC 2782 to destinations that we know of, and factor those in when assigning builds to nodes in here.

func (*Farm) Status

func (f *Farm) Status(ctx context.Context) (map[string]error, error)

Status polls the connections in the farm and returns a map of their individual status, along with an error if any are down or otherwise unreachable.

type Schedule

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

Schedule is a description of where and how we'll do builds.

Jump to

Keyboard shortcuts

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