json

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2016 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.15.0

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