llbfactory

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	// Construct creates a pllb.State
	Construct() pllb.State
}

Factory is used for constructing llb states

func Local

func Local(name string, opts ...llb.LocalOption) Factory

Local eventually creates a llb.Local

func PreconstructedState

func PreconstructedState(state pllb.State) Factory

PreconstructedState returns a pseudo-factory which returns the passed in state when Construct() is called. It is provided for cases where a factory is overkill.

type LocalFactory

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

LocalFactory holds data which can be used to create a pllb.Local state

func (*LocalFactory) Construct

func (f *LocalFactory) Construct() pllb.State

Construct constructs the pllb.Local state

func (*LocalFactory) Copy

func (f *LocalFactory) Copy() *LocalFactory

Copy makes a new copy of the localFactory

func (*LocalFactory) GetName

func (f *LocalFactory) GetName() string

GetName returns the name of the pllb.Local state that will eventually be created

func (*LocalFactory) GetSharedKey

func (f *LocalFactory) GetSharedKey() string

GetSharedKey returns the set shared cache key of the pllb.Local state that will eventually be created

func (*LocalFactory) WithInclude

func (f *LocalFactory) WithInclude(patterns []string) *LocalFactory

WithInclude adds include patterns to the factory's llb options

func (*LocalFactory) WithSharedKeyHint

func (f *LocalFactory) WithSharedKeyHint(key string) *LocalFactory

WithSharedKeyHint adds a shared key hint to the factory's llb options

type PreconstructedFactory

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

PreconstructedFactory holds a preconstructed pllb.State for cases where a factory is overkill.

func (*PreconstructedFactory) Construct

func (f *PreconstructedFactory) Construct() pllb.State

Construct returns the preconstructed state that was passed to PreconstructedState()

Jump to

Keyboard shortcuts

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