client-go: Index | Files

package versioned

import ""


Package Files

decoder.go encoder.go

type Decoder Uses

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 Uses

func NewDecoder(decoder streaming.Decoder, embeddedDecoder runtime.Decoder) *Decoder

NewDecoder creates an Decoder for the given writer and codec.

func (*Decoder) Close Uses

func (d *Decoder) Close()

Close closes the underlying r.

func (*Decoder) Decode Uses

func (d *Decoder) Decode() (watch.EventType, runtime.Object, error)

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 Uses

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 Uses

func NewEncoder(encoder streaming.Encoder, embeddedEncoder runtime.Encoder) *Encoder

func (*Encoder) Encode Uses

func (e *Encoder) Encode(event *watch.Event) error

Encode writes an event to the writer. Returns an error if the writer is closed or an object can't be encoded.

Package versioned imports 6 packages (graph) and is imported by 71 packages. Updated 2020-05-20. Refresh now. Tools for package owners.