Documentation ¶
Index ¶
- type Farm
- func (f *Farm) Build(ctx context.Context, schedule Schedule, options entities.BuildOptions, ...) error
- func (f *Farm) Done(ctx context.Context) error
- func (f *Farm) EmulatedPlatforms(ctx context.Context) ([]string, error)
- func (f *Farm) NativePlatforms(ctx context.Context) ([]string, error)
- func (f *Farm) Schedule(ctx context.Context, platforms []string) (Schedule, error)
- func (f *Farm) Status(ctx context.Context) (map[string]error, error)
- type Schedule
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 (*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) EmulatedPlatforms ¶
EmulatedPlatforms returns a list of the set of platforms for which the farm can build images with the help of emulation.
func (*Farm) NativePlatforms ¶
NativePlatforms returns a list of the set of platforms for which the farm can build images natively.
func (*Farm) Schedule ¶
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.