Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsistentRead ¶ added in v1.7.14
ConsistentRead repeatedly reads a file until it gets the same content twice. This is useful when reading files in /proc that are larger than page size and kernel may modify them between individual read() syscalls.
Types ¶
type NsenterWriter ¶
type NsenterWriter struct {
// contains filtered or unexported fields
}
NsenterWriter is 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 limitation one has to first enter hosts namespace (by using 'nsenter') and only then write data.
func NewNsenterWriter ¶ added in v1.11.1
func NewNsenterWriter(ne *nsenter.Nsenter) *NsenterWriter
NewNsenterWriter creates a new Writer that allows writing data to file using nsenter command.