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.
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.
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.
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
- func ArchitectureAliases() map[ArchitectureName][]string
- func ArchitecturesByName() map[string]ArchitectureName
- func HostArchitecture() (string, error)
- func TransformFromSchema(ctx context.Context, data interface{}) (interface{}, error)
- type Architecture
- type ArchitectureConfig
- func (ac ArchitectureConfig) IsUnpacked() bool
- func (ac ArchitectureConfig) KConfig() kconfig.KeyValueMap
- func (ac ArchitectureConfig) KConfigTree(context.Context, ...*kconfig.KeyValue) (*kconfig.KConfigFile, error)
- func (ac ArchitectureConfig) MarshalYAML() (interface{}, error)
- func (ac ArchitectureConfig) Name() string
- func (ac ArchitectureConfig) Path() string
- func (ac ArchitectureConfig) PrintInfo(ctx context.Context) string
- func (ac ArchitectureConfig) Source() string
- func (ac ArchitectureConfig) String() string
- func (ac ArchitectureConfig) Type() unikraft.ComponentType
- func (ac ArchitectureConfig) Version() string
- type ArchitectureName
- type ArchitectureOption
Constants ¶
const ( ArchitectureUnknown = ArchitectureName("unknown") ArchitectureX86_64 = ArchitectureName("x86_64") ArchitectureArm64 = ArchitectureName("arm64") ArchitectureArm = ArchitectureName("arm") )
Variables ¶
This section is empty.
Functions ¶
func ArchitectureAliases ¶ added in v0.7.1
func ArchitectureAliases() map[ArchitectureName][]string
ArchitectureAliases returns all the name alises for a given architecture.
func ArchitecturesByName ¶ added in v0.7.1
func ArchitecturesByName() map[string]ArchitectureName
ArchitecturesByName returns the list of known architectures and their name alises.
func HostArchitecture ¶ added in v0.6.0
HostArchitecture returns the architecture of the host or an error if unsupported by Unikraft.
func TransformFromSchema ¶ added in v0.4.0
TransformFromSchema parses an input schema and returns an instantiated ArchitectureConfig
Types ¶
type Architecture ¶
func NewArchitectureFromOptions ¶ added in v0.7.1
func NewArchitectureFromOptions(opts ...ArchitectureOption) Architecture
NewArchitectureFromOptions is a constructor that configures an architecture.
type ArchitectureConfig ¶
type ArchitectureConfig struct {
// contains filtered or unexported fields
}
func NewArchitectureFromSchema ¶ added in v0.4.0
func NewArchitectureFromSchema(value string) (ArchitectureConfig, error)
NewArchitectureFromSchema parse short syntax for architecture configuration
func (ArchitectureConfig) IsUnpacked ¶ added in v0.4.0
func (ac ArchitectureConfig) IsUnpacked() bool
func (ArchitectureConfig) KConfig ¶ added in v0.4.0
func (ac ArchitectureConfig) KConfig() kconfig.KeyValueMap
func (ArchitectureConfig) KConfigTree ¶ added in v0.4.0
func (ac ArchitectureConfig) KConfigTree(context.Context, ...*kconfig.KeyValue) (*kconfig.KConfigFile, error)
func (ArchitectureConfig) MarshalYAML ¶ added in v0.6.4
func (ac ArchitectureConfig) MarshalYAML() (interface{}, error)
func (ArchitectureConfig) Name ¶
func (ac ArchitectureConfig) Name() string
func (ArchitectureConfig) Path ¶ added in v0.4.0
func (ac ArchitectureConfig) Path() string
func (ArchitectureConfig) PrintInfo ¶
func (ac ArchitectureConfig) PrintInfo(ctx context.Context) string
func (ArchitectureConfig) Source ¶
func (ac ArchitectureConfig) Source() string
func (ArchitectureConfig) String ¶ added in v0.7.0
func (ac ArchitectureConfig) String() string
func (ArchitectureConfig) Type ¶
func (ac ArchitectureConfig) Type() unikraft.ComponentType
func (ArchitectureConfig) Version ¶
func (ac ArchitectureConfig) Version() string
type ArchitectureName ¶ added in v0.7.1
type ArchitectureName string
func ArchitectureByName ¶ added in v0.7.1
func ArchitectureByName(name string) ArchitectureName
ArchitectureByName returns the architecture for a given name. If the name is not known, it returns it unchanged.
func Architectures ¶ added in v0.7.1
func Architectures() []ArchitectureName
Architectures returns all the unique Architectures.
func (ArchitectureName) String ¶ added in v0.7.1
func (ht ArchitectureName) String() string
String implements fmt.Stringer
type ArchitectureOption ¶ added in v0.7.1
type ArchitectureOption func(*ArchitectureConfig)
ArchitectureOption is a function that modifies a ArchitectureConfig.
func WithKConfig ¶ added in v0.7.1
func WithKConfig(kconfig kconfig.KeyValueMap) ArchitectureOption
WithKConfig sets the kconfig of the architecture.
func WithName ¶ added in v0.7.1
func WithName(name string) ArchitectureOption
WithName sets the name of the architecture.
func WithPath ¶ added in v0.7.1
func WithPath(path string) ArchitectureOption
WithPath sets the path of the architecture.
func WithSource ¶ added in v0.7.1
func WithSource(source string) ArchitectureOption
WithSource sets the source of the architecture.
func WithVersion ¶ added in v0.7.1
func WithVersion(version string) ArchitectureOption
WithVersion sets the version of the architecture.