json

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2016 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Object

func Object(encoder runtime.Encoder, event *watch.Event) (interface{}, error)

Object converts a watch.Event into an appropriately serializable JSON object

Types

type WatchEvent

type WatchEvent struct {
	// The type of the watch event; added, modified, deleted, or error.
	Type watch.EventType `json:"type,omitempty" description:"the type of watch event; may be ADDED, MODIFIED, DELETED, or ERROR"`

	// For added or modified objects, this is the new object; for deleted objects,
	// it's the state of the object immediately prior to its deletion.
	// For errors, it's an api.Status.
	Object runtime.RawExtension `` /* 151-byte string literal not displayed */
}

WatchEvent objects are streamed from the api server in response to a watch request. These are not API objects and may not be changed in a backward-incompatible way. TODO: move to a public, versioned object now that RawExtension conversions are possible in the schema.

Jump to

Keyboard shortcuts

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