package ioutils
import "k8s.io/kubernetes/pkg/kubelet/util/ioutils"
Index ¶
- func LimitWriter(w io.Writer, n int64) io.Writer
- func WriteCloserWrapper(w io.Writer) io.WriteCloser
- type LimitedWriter
Functions ¶
func LimitWriter ¶
LimitWriter is a copy of the standard library ioutils.LimitReader, applied to the writer interface. LimitWriter returns a Writer that writes to w but stops with EOF after n bytes. The underlying implementation is a *LimitedWriter.
func WriteCloserWrapper ¶
func WriteCloserWrapper(w io.Writer) io.WriteCloser
WriteCloserWrapper returns a writeCloserWrapper.
Types ¶
type LimitedWriter ¶
A LimitedWriter writes to W but limits the amount of data returned to just N bytes. Each call to Write updates N to reflect the new amount remaining. Write returns EOF when N <= 0 or when the underlying W returns EOF.
func (*LimitedWriter) Write ¶
func (l *LimitedWriter) Write(p []byte) (n int, err error)
Source Files ¶
ioutils.go
- Version
- v1.27.0-alpha.1
- Published
- Jan 24, 2023
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 1 minute ago –
Tools for package owners.