Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ContainerExtension is the file extension checked for Containers. ContainerExtension = ".ctr" // ObjectsDir is the directory checked for arbitrary Kubernetes objects. ObjectsDir = "rs" )
Variables ¶
View Source
var ( // RCExtension is the partial extension checked for RCs RCExtension = "rc" // PodExtension is the partial extension checked for Pods. PodExtension = "pod" // ObjectExtensions are the file extensions that objects should be checked for in ObjectExtensions = []string{"json", "yml", "yaml"} )
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.