package versioned
import "k8s.io/client-go/rest/watch"
Index ¶
- type Decoder
- func NewDecoder(decoder streaming.Decoder, embeddedDecoder runtime.Decoder) *Decoder
- func (d *Decoder) Close()
- func (d *Decoder) Decode() (watch.EventType, runtime.Object, error)
- type Encoder
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder implements the watch.Decoder interface for io.ReadClosers that have contents which consist of a series of watchEvent objects encoded with the given streaming decoder. The internal objects will be then decoded by the embedded decoder.
func NewDecoder ¶
NewDecoder creates an Decoder for the given writer and codec.
func (*Decoder) Close ¶
func (d *Decoder) Close()
Close closes the underlying r.
func (*Decoder) Decode ¶
Decode blocks until it can return the next object in the reader. Returns an error if the reader is closed or an object can't be decoded.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder serializes watch.Events into io.Writer. The internal objects are encoded using embedded encoder, and the outer Event is serialized using encoder. TODO: this type is only used by tests
func NewEncoder ¶
func (*Encoder) Encode ¶
Encode writes an event to the writer. Returns an error if the writer is closed or an object can't be encoded.
Source Files ¶
decoder.go encoder.go
- Version
- v0.17.12
- Published
- Sep 16, 2020
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 36 minutes ago –
Tools for package owners.