loaders

package
v0.0.0-...-8b8e185 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoader

func GetLoader(uriStr string) (containerdefs.DefinitionLoader, error)

GetLoader parses a given URI and returns an appropriate loader. For now this always returns our default (and only) loader, but could be easily expanded to load container definitions from a remote location, or from a single file.

Types

type LoaderDirectory

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

func (*LoaderDirectory) LoadContainerDefinitions

func (l *LoaderDirectory) LoadContainerDefinitions() ([]*containerdefs.ContainerDefinition, error)

LoadContainerDefinitions scans a local directory (might have been passed from the command line) for container definitions, reads them into memory and unmarshalls them into ContainerDefinition structs. This scan is not recursive and will not search subdirectories for definitions.

func (*LoaderDirectory) ValidateURI

func (l *LoaderDirectory) ValidateURI() error

type LoaderFile

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

func (*LoaderFile) LoadContainerDefinitions

func (l *LoaderFile) LoadContainerDefinitions() ([]*containerdefs.ContainerDefinition, error)

LoadContainerDefinitions reads a local yaml or json file for container definitions, loads them into memory and unmarshalls them into ContainerDefinition structs.

func (*LoaderFile) ValidateURI

func (l *LoaderFile) ValidateURI() error

type LoaderStdin

type LoaderStdin struct{}

func (*LoaderStdin) LoadContainerDefinitions

func (l *LoaderStdin) LoadContainerDefinitions() ([]*containerdefs.ContainerDefinition, error)

LoadContainerDefinitions reads yaml or json data from stdin.

func (*LoaderStdin) ValidateURI

func (l *LoaderStdin) ValidateURI() error

we don't have a uri to validate for this loader

type LoaderURL

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

func (*LoaderURL) LoadContainerDefinitions

func (l *LoaderURL) LoadContainerDefinitions() ([]*containerdefs.ContainerDefinition, error)

LoadContainerDefinitions reads a remote url that returns a list of container definitions in yaml or json format, loads them into memory and unmarshalls them into ContainerDefinition structs.

func (*LoaderURL) ValidateURI

func (l *LoaderURL) ValidateURI() error

Jump to

Keyboard shortcuts

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