storage

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBackend added in v0.2.0

func RegisterBackend(backendName string, factory BackendFactory)

RegisterBackend can be used to register a new storage backend in order to be available.

Types

type Backend

type Backend interface {
	// Init initialize the storage backend with the docker client (SDK).
	Init(dockerClient *dockerClient.Client)

	// Load loads the image inside the docker engine and returns the image key assigned inside the docker engine.
	LoadImage(imageKey string) (string, error)
}

Backend interface for container's images storage backends.

func CreateBackend added in v0.2.0

func CreateBackend(config *configuration.Configuration) Backend

CreateBackend is used to obtain a storage backend based on the configurations.

type BackendFactory added in v0.2.0

type BackendFactory func() (Backend, error)

BackendFactory represents a method that creates a new image storage backend.

type BaseBackend

type BaseBackend struct {
	// contains filtered or unexported fields
}

BaseBackend is a base for all the storage backends.

type DockerHubBackend

type DockerHubBackend struct {
	BaseBackend
}

DockerHubBackend represents a image storage backup that uses the Docker public registry to store and retrieve images to run in CARAVELA.

func (*DockerHubBackend) Init added in v0.2.0

func (dockerHub *DockerHubBackend) Init(dockerClient *dockerClient.Client)

func (*DockerHubBackend) LoadImage added in v0.2.0

func (dockerHub *DockerHubBackend) LoadImage(imageKey string) (string, error)

type IPFSBackend

type IPFSBackend struct {
	BaseBackend
}

IPFSBackend is a backend implemented on top of the highly distributed IPFS file system.

func (*IPFSBackend) Init added in v0.2.0

func (ipfs *IPFSBackend) Init(dockerClient *dockerClient.Client)

func (*IPFSBackend) LoadImage added in v0.2.0

func (ipfs *IPFSBackend) LoadImage(imageKey string) (string, error)

Jump to

Keyboard shortcuts

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