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.
Package initrd is a package that is used for the dynamic construction of CPIO archives which are used as initramfs for a unikernel instance.
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
- type Initrd
- func New(ctx context.Context, path string, opts ...InitrdOption) (Initrd, error)
- func NewFromDirectory(_ context.Context, path string, opts ...InitrdOption) (Initrd, error)
- func NewFromDockerfile(ctx context.Context, path string, opts ...InitrdOption) (Initrd, error)
- func NewFromFile(_ context.Context, path string, opts ...InitrdOption) (Initrd, error)
- type InitrdOption
- type InitrdOptions
Constants ¶
const DefaultInitramfsFileName = "initramfs.cpio"
DefaultInitramfsFileName is the default filename used when creating or serializing a CPIO archive.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initrd ¶ added in v0.7.0
type Initrd interface { // Build the rootfs and return the location of the result or error. Build(context.Context) (string, error) // All directories and files that are contained within the initramfs. Files() []string }
Initrd is an interface that is used to allow for different underlying implementations to construct a CPIO archive.
func New ¶ added in v0.7.0
New attempts to return the builder for a supplied path which will allow the provided ...
func NewFromDirectory ¶ added in v0.7.0
NewFromDirectory returns an instantiated Initrd interface which is is able to serialize a rootfs from a given directory.
func NewFromDockerfile ¶ added in v0.7.0
NewFromDockerfile accepts an input path which represents a Dockerfile that can be constructed via buildkit to become a CPIO archive.
func NewFromFile ¶ added in v0.6.0
NewFromFile accepts an input file which already represents a CPIO archive and is provided as a mechanism for satisfying the Initrd interface.
type InitrdOption ¶ added in v0.7.0
type InitrdOption func(*InitrdOptions) error
func WithCacheDir ¶ added in v0.7.0
func WithCacheDir(dir string) InitrdOption
WithCacheDir sets the path of an internal location that's used during the serialization of the initramfs as a mechanism for storing temporary files used as cache.
func WithOutput ¶ added in v0.7.0
func WithOutput(output string) InitrdOption
WithOutput sets the location of the output location of the resulting CPIO archive file.
type InitrdOptions ¶ added in v0.7.0
type InitrdOptions struct {
// contains filtered or unexported fields
}