feeder

package
v0.0.0-...-066ce53 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRIOFeeder

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

CRIOFeeder wraps the libpod.Runtime and implementes the Feeder interface.

func NewCRIOFeeder

func NewCRIOFeeder() (*CRIOFeeder, error)

NewCRIOFeeder returns a pointer to an initialized CRIOFeeder.

func (*CRIOFeeder) Images

func (f *CRIOFeeder) Images() ([]string, error)

Images returns an array of images present in containers/storage.

func (*CRIOFeeder) LoadImage

func (f *CRIOFeeder) LoadImage(path string) (string, error)

LoadImage loads the specified image into containers/storage and returns the image name.

func (*CRIOFeeder) TagImage

func (f *CRIOFeeder) TagImage(image string, tags []string) error

TagImage tags the specified image with the supplied tags.

type DockerFeeder

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

func NewDockerFeeder

func NewDockerFeeder() (*DockerFeeder, error)

Returns a new Feeder instance. Takes care of initializing the connection with the Docker daemon.

func (*DockerFeeder) Images

func (f *DockerFeeder) Images() ([]string, error)

Images returns images available on the docker host in the form "<repo>:<tag>".

func (*DockerFeeder) LoadImage

func (f *DockerFeeder) LoadImage(pathToImage string) (string, error)

LoadImage loads the specified image into docker. Returns the image name loaded into the docker daemon.

func (*DockerFeeder) TagImage

func (f *DockerFeeder) TagImage(image string, tags []string) error

TagImage tags the specified docker image with the supplied tags.

type FailedImportError

type FailedImportError struct {
	Image string
	Error error
}

type Feeder

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

Feeder includes a concrete object implementing the FeederIface and FeederConfig

func NewFeeder

func NewFeeder() (*Feeder, error)

NewFeeder returns a new Container Feeder based on the specified type in the container-feeder.json config (default: DockerFeeder)

type FeederConfig

type FeederConfig struct {
	Target    string   `json:"feeder-target,omitempty"`
	Whitelist []string `json:"whitelist,omitempty"`
}

special type to load the container-feeder.json config

type FeederIface

type FeederIface interface {
	Images() ([]string, error)
	LoadImage(string) (string, error)
	TagImage(string, []string) error
}

FeederIface is a generalized interface that Container Feeders must implement

type FeederLoadResponse

type FeederLoadResponse struct {
	SuccessfulImports []string
	FailedImports     []FailedImportError
}

func Import

func Import(path string) (FeederLoadResponse, error)

Imports all the RPMs images stored inside of `path` into the local docker daemon

type ImageType

type ImageType struct {
	Name string   `json:"name"`
	Tags []string `json:"tags"`
	File string   `json:"file"`
}

ImageType struct to handle JSON schema

type MetadataType

type MetadataType struct {
	Image ImageType
}
Image metadata type JSON schema:
{
  "image": {
    "name": "",
    "tags": [ ],
    "file": ""
  }
}

For example:

{
  "image": {
    "name": "opensuse/salt-api",
    "tags": [ "13", "13.0.1", "latest" ],
    "file": "salt-api-2017.03-docker-images.x86_64.tar.xz"
  }
}

MetadataType struct to handle JSON schema

Jump to

Keyboard shortcuts

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