Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RCFile is the filename checked for Replication Controllers. RCFile = "rc.yml" // PodFile is the filename checked for Pods. PodFile = "pod.yml" // ContainerExtension is the file extension checked for Containers. ContainerExtension = ".ctr" // ObjectsDir is the directory checked for arbitrary Kubernetes objects. ObjectsDir = ".k2e" )
Variables ¶
View Source
var ( // ErrTooManyRCs is returned when there are more than one RC in a directory ErrTooManyRCs = errors.New("only one RC is allowed per directory") // ErrTooManyPods is when there are more than one Pod in a directory ErrTooManyPods = errors.New("only one Pod is allowed per directory") )
View Source
var ( // ErrInvalidType is returned when the entity.Type is unknown ErrInvalidType = errors.New("passed invalid type") )
Functions ¶
This section is empty.
Types ¶
type FileInput ¶
type FileInput struct {
FileSource
}
FileInput produces Entities from objects stored at a given path of the filesystem using the Redspread convention.
func NewFileInput ¶
NewFileInput returns an Input based on a file system
type FileSource ¶
type FileSource string
FileSource provides access to Entities stored according to the Redspread file convention. Under this convention RC's are looked for in RCFile, Pods are looked for in PodFile, and anything with the extension ContainerExtension is considered a container.
func (FileSource) Entities ¶
func (fs FileSource) Entities(t entity.Type, objects ...deploy.KubeObject) ([]entity.Entity, error)
Entities returns the entities of the requested type from the source. Errors if any invalid entities.
func (FileSource) Objects ¶
func (fs FileSource) Objects() (objects []deploy.KubeObject, err error)
Objects returns the Kubernetes objects available from the source. Errors if any invalid objects.
Click to show internal directories.
Click to hide internal directories.