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.
Package volume provides the representation of a volume within the context of a application project and seeded via a Kraftfile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformFromSchema ¶
TransformFromSchema parses an input schema and returns an instantiated VolumeConfig
Types ¶
type Volume ¶
type Volume interface { // Driver is the name of the implementing strategy. Volume drivers let you // store volumes on remote hosts or cloud providers, to encrypt the contents of // volumes, or to add other functionality. Driver() string // The source of the mount. For named volumes, this is the name of the // volume. For anonymous volumes, this field is omitted. Source() string // The destination takes as its value the path where the file or directory is // mounted in the machine. Destination() string // File permission mode (Linux only). Mode() string // Whether the volume is readonly. ReadOnly() bool }
Volume is a porclained interface which contains information about an individual volume that is to be mounted to a unikernel instance at runtime.
type VolumeConfig ¶
type VolumeConfig struct {
// contains filtered or unexported fields
}
VolumeConfig contains information about an individual volume that is to be mounted to a unikernel instance at runtime.
func (*VolumeConfig) Destination ¶
func (volume *VolumeConfig) Destination() string
Destination implements Volume.
func (*VolumeConfig) MarshalYAML ¶ added in v0.7.2
func (volume *VolumeConfig) MarshalYAML() (interface{}, error)
MarshalYAML makes LibraryConfig implement yaml.Marshaller
func (*VolumeConfig) ReadOnly ¶
func (volume *VolumeConfig) ReadOnly() bool
ReadOnly implements Volume.