firmware

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmakeFlags

func CmakeFlags(flags []BuildFlag) string

func EscapeFlagParam

func EscapeFlagParam(input string) string

Types

type BuildFlag

type BuildFlag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func NewFlag

func NewFlag(key string, value string) BuildFlag

func (*BuildFlag) Format

func (flag *BuildFlag) Format() string

type Builder

type Builder interface {
	PullImage(ctx context.Context, buildContainer string) error
	Build(ctx context.Context, buildContainer string, flags []BuildFlag) ([]byte, error)
}

type PodmanBuilder

type PodmanBuilder struct {
	PodmanExecutor PodmanExecutor
	CPULimit       int // logical cores
	MemoryLimit    int // bytes
	// contains filtered or unexported fields
}

func NewPodmanBuilder

func NewPodmanBuilder(workingDir string, recorder *buildlogs.Recorder, cpuLimit int, memoryLimit int) *PodmanBuilder

func (*PodmanBuilder) Build

func (builder *PodmanBuilder) Build(ctx context.Context, buildContainer string, flags []BuildFlag) ([]byte, error)

func (*PodmanBuilder) PullImage

func (builder *PodmanBuilder) PullImage(ctx context.Context, buildContainer string) error

type PodmanExecutor

type PodmanExecutor func(ctx context.Context, name string, args ...string) (string, error)

func DefaultPodmanExecutor

func DefaultPodmanExecutor(workingDir string) PodmanExecutor

Jump to

Keyboard shortcuts

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