app

package
v0.1.0-24-ga60fd7e Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: BSD-3-Clause Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultKConfigFile = ".config"

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	component.Component
}

type ApplicationConfig

type ApplicationConfig struct {
	component.ComponentConfig

	WorkingDir    string                `yaml:"-" json:"-"`
	Filename      string                `yaml:"-" json:"-"`
	OutDir        string                `yaml:",omitempty" json:"outdir,omitempty"`
	Unikraft      core.UnikraftConfig   `yaml:",omitempty" json:"unikraft,omitempty"`
	Libraries     lib.Libraries         `yaml:",omitempty" json:"libraries,omitempty"`
	Targets       target.Targets        `yaml:",omitempty" json:"targets,omitempty"`
	Extensions    component.Extensions  `yaml:",inline" json:"-"` // https://github.com/golang/go/issues/6213
	KraftFiles    []string              `yaml:"-" json:"-"`
	Configuration kconfig.KConfigValues `yaml:"-" json:"-"`
}

func (*ApplicationConfig) Build

func (a *ApplicationConfig) Build(opts ...BuildOption) error

Build offers an invocation of the Unikraft build system with the contextual information of the ApplicationConfigs

func (*ApplicationConfig) Clean

func (a *ApplicationConfig) Clean(mopts ...make.MakeOption) error

Clean the application

func (ApplicationConfig) Component

func (*ApplicationConfig) Components

func (ac *ApplicationConfig) Components() []component.Component

Components returns a unique list of Unikraft components which this applicatiton consists of

func (*ApplicationConfig) Configure

func (a *ApplicationConfig) Configure(mopts ...make.MakeOption) error

Configure the application

func (*ApplicationConfig) DefConfig

func (ac *ApplicationConfig) DefConfig(tc *target.TargetConfig, extra *kconfig.KConfigValues, mopts ...make.MakeOption) error

Defconfig updates the configuration

func (*ApplicationConfig) Fetch

func (a *ApplicationConfig) Fetch(mopts ...make.MakeOption) error

Fetch component sources for the applications

func (*ApplicationConfig) IsConfigured

func (a *ApplicationConfig) IsConfigured() bool

IsConfigured returns a boolean to indicate whether the application has been previously configured. This is deteremined by finding a non-empty `.config` file within the application's source directory

func (*ApplicationConfig) KConfigFile

func (ac *ApplicationConfig) KConfigFile() (string, error)

KConfigFile returns the path to the application's .config file

func (ApplicationConfig) KConfigMenu

func (ac ApplicationConfig) KConfigMenu() (*kconfig.KConfigFile, error)

func (ApplicationConfig) KConfigValues

func (ac ApplicationConfig) KConfigValues() (kconfig.KConfigValues, error)

func (*ApplicationConfig) LibraryNames

func (a *ApplicationConfig) LibraryNames() []string

LibraryNames return names for all libraries in this Compose config

func (*ApplicationConfig) Make

func (a *ApplicationConfig) Make(mopts ...make.MakeOption) error

Make is a method which invokes Unikraft's build system. You can pass in make options based on the `make` package. Ultimately, this is an abstract method which will be used by a number of well-known make command goals by Unikraft's build system.

func (*ApplicationConfig) MakeArgs

func (a *ApplicationConfig) MakeArgs() (*core.MakeArgs, error)

MakeArgs returns the populated `core.MakeArgs` based on the contents of the instantiated `ApplicationConfig`. This information can be passed directly to Unikraft's build system.

func (ApplicationConfig) Name

func (ac ApplicationConfig) Name() string

func (*ApplicationConfig) Prepare

func (a *ApplicationConfig) Prepare(mopts ...make.MakeOption) error

Prepare the application

func (ApplicationConfig) PrintInfo

func (ac ApplicationConfig) PrintInfo(io *iostreams.IOStreams) error

func (*ApplicationConfig) Properclean

func (a *ApplicationConfig) Properclean(mopts ...make.MakeOption) error

Delete the build folder of the application

func (*ApplicationConfig) Set

func (a *ApplicationConfig) Set(mopts ...make.MakeOption) error

func (ApplicationConfig) Source

func (ac ApplicationConfig) Source() string

func (*ApplicationConfig) SyncConfig

func (a *ApplicationConfig) SyncConfig(mopts ...make.MakeOption) error

SyncConfig updates the configuration

func (*ApplicationConfig) TargetByName

func (a *ApplicationConfig) TargetByName(name string) (*target.TargetConfig, error)

TargetByName returns the `*target.TargetConfig` based on an input name

func (*ApplicationConfig) TargetNames

func (a *ApplicationConfig) TargetNames() []string

TargetNames return names for all targets in this Compose config

func (ApplicationConfig) Type

func (*ApplicationConfig) Unset

func (a *ApplicationConfig) Unset(mopts ...make.MakeOption) error

func (ApplicationConfig) Version

func (ac ApplicationConfig) Version() string

type BuildOption

type BuildOption func(opts *BuildOptions) error

func WithBuildLogFile

func WithBuildLogFile(path string) BuildOption

WithBuildLogFile specifies a path to a file which will be used to save the output from Unikraft's build invocation

func WithBuildLogger

func WithBuildLogger(l log.Logger) BuildOption

WithBuildLogger sets the logger which can be used by the underlying build mechanisms

func WithBuildMakeOptions

func WithBuildMakeOptions(mopts ...make.MakeOption) BuildOption

WithBuildMakeOptions allows customization of the invocation of the GNU make tool

func WithBuildNoPrepare

func WithBuildNoPrepare(noPrepare bool) BuildOption

WithBuildNoPrepare disables calling `make prepare` befere invoking the main Unikraft's build invocation.

func WithBuildNoSyncConfig

func WithBuildNoSyncConfig(noSyncConfig bool) BuildOption

WithBuildNoSyncConfig disables calling `make syncconfig` befere invoking the main Unikraft's build invocation.

func WithBuildProgressFunc

func WithBuildProgressFunc(onProgress func(progress float64)) BuildOption

WithBuildProgressFunc sets an optional progress function which is used as a callback during the ultimate invocation of make within Unikraft's build system

func WithBuildTarget

func WithBuildTarget(targets ...target.TargetConfig) BuildOption

WithBuildTarget specifies one or many of the listed targets defined by the application's Kraftfile

type BuildOptions

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

Jump to

Keyboard shortcuts

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