watch

package
v0.0.0-...-ac8ee45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIEventDecoder

type APIEventDecoder struct {
	// contains filtered or unexported fields
}

APIEventDecoder implements the watch.Decoder interface for io.ReadClosers that have contents which consist of a series of api.WatchEvent objects encoded via JSON. It will decode any object which is registered to convert to api.WatchEvent via api.Scheme

func NewAPIEventDecoder

func NewAPIEventDecoder(stream io.ReadCloser) *APIEventDecoder

NewAPIEventDecoder creates an APIEventDecoder for the given stream.

func (*APIEventDecoder) Close

func (d *APIEventDecoder) Close()

Close closes the underlying stream.

func (*APIEventDecoder) Decode

func (d *APIEventDecoder) Decode() (action watch.EventType, object runtime.Object, err error)

Decode blocks until it can return the next object in the stream. Returns an error if the stream is closed or an object can't be decoded.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL