package io
import "k8s.io/kubernetes/pkg/util/io"
Index ¶
- func LoadPodFromFile(filePath string) (*api.Pod, error)
- func SavePodToFile(pod *api.Pod, filePath string, perm os.FileMode) error
- type NsenterWriter
- type StdWriter
- type Writer
Functions ¶
func LoadPodFromFile ¶
LoadPodFromFile will read, decode, and return a Pod from a file.
func SavePodToFile ¶
SavePodToFile will encode and save a pod to a given path & permissions
Types ¶
type NsenterWriter ¶
type NsenterWriter struct { }
Alternative implementation of Writer interface that allows writing data to file using nsenter command. If a program (e.g. kubelet) runs in a container it may want to write data to a mounted device. Since in Docker, mount propagation mode is set to private, it will not see the mounted device in its own namespace. To work around this limitaion one has to first enter hosts namespace (by using 'nsenter') and only then write data.
func (*NsenterWriter) WriteFile ¶
type StdWriter ¶
type StdWriter struct { }
StdWriter implements Writer interface and uses standard libraries for writing data to files.
func (*StdWriter) WriteFile ¶
type Writer ¶
Writer is an interface which allows to write data to a file.
Source Files ¶
io.go writer.go
- Version
- v1.1.4-beta.0
- Published
- Dec 7, 2015
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 15 seconds ago –
Tools for package owners.