component

package
v0.5.2-147-g5e31ad2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NameAndVersion

func NameAndVersion(component Component) string

NameAndVersion accepts a component and provids the canonical string representation of the component with its name and version

func TranslateFromSchema added in v0.5.1

func TranslateFromSchema(props interface{}) (map[string]interface{}, error)

TranslateFromSchema is an intermediate method used to convert well-known attributes from the Kraftfile schema into a standardized map. This method is primarily used by other components internally which follow a similar format of specifying a version, source and list of KConfig options.

Types

type Component

type Component interface {
	unikraft.Nameable

	// Source returns the component source
	Source() string

	// Path is the location to this library within the context of a project.
	Path() string

	// KConfigTree returns the component's KConfig configuration menu tree which
	// returns all possible options for the component
	KConfigTree(...*kconfig.KeyValue) (*kconfig.KConfigFile, error)

	// KConfig returns the component's set of file KConfig which is known when the
	// relevant component packages have been retrieved
	KConfig() kconfig.KeyValueMap

	// PrintInfo returns human-readable information about the component
	PrintInfo(context.Context) string
}

Component is the abstract interface for managing the individual microlibrary

type Extensions

type Extensions map[string]interface{}

Jump to

Keyboard shortcuts

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