volume

package
v0.6.7-365-gf92f5b2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: BSD-3-Clause Imports: 3 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.

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

func TransformFromSchema(ctx context.Context, data interface{}) (interface{}, error)

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) Driver

func (volume *VolumeConfig) Driver() string

Driver implements Volume.

func (*VolumeConfig) Mode

func (volume *VolumeConfig) Mode() string

Mode implements Volume.

func (*VolumeConfig) ReadOnly

func (volume *VolumeConfig) ReadOnly() bool

ReadOnly implements Volume.

func (*VolumeConfig) Source

func (volume *VolumeConfig) Source() string

Source implements Volume.

Jump to

Keyboard shortcuts

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