versioned

package
v1.3.10-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package versioned is a generated protocol buffer package.

It is generated from these files:
	k8s.io/kubernetes/pkg/watch/versioned/generated.proto

It has these top-level messages:
	Event

Package versioned contains the versioned types for watch. This is the first serialization version unless otherwise noted.

Index

Constants

View Source
const WatchEventKind = "WatchEvent"

WatchEventKind is name reserved for serializing watch events.

Variables

View Source
var (
	ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated   = fmt.Errorf("proto: integer overflow")
)

Functions

func AddToGroupVersion

func AddToGroupVersion(scheme *runtime.Scheme, groupVersion unversioned.GroupVersion)

AddToGroupVersion registers the watch external and internal kinds with the scheme, and ensures the proper conversions are in place.

func Convert_versioned_Event_to_versioned_InternalEvent

func Convert_versioned_Event_to_versioned_InternalEvent(in *Event, out *InternalEvent, s conversion.Scope) error

func Convert_versioned_Event_to_watch_Event

func Convert_versioned_Event_to_watch_Event(in *Event, out *watch.Event, s conversion.Scope) error

func Convert_versioned_InternalEvent_to_versioned_Event

func Convert_versioned_InternalEvent_to_versioned_Event(in *InternalEvent, out *Event, s conversion.Scope) error

func Convert_watch_Event_to_versioned_Event

func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *Event, s conversion.Scope) error

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

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

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

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

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.

func NewEncoder

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

func (*Encoder) Encode

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.

type Event

type Event struct {
	Type string `json:"type" protobuf:"bytes,1,opt,name=type"`

	// Object is:
	//  * If Type is Added or Modified: the new state of the object.
	//  * If Type is Deleted: the state of the object immediately before deletion.
	//  * If Type is Error: *api.Status is recommended; other types may make sense
	//    depending on context.
	Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"`
}

Event represents a single event to a watched resource.

+protobuf=true

func (*Event) GetObjectKind

func (e *Event) GetObjectKind() unversioned.ObjectKind

func (*Event) Marshal

func (m *Event) Marshal() (data []byte, err error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(data []byte) (int, error)

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (m *Event) String() string

func (*Event) Unmarshal

func (m *Event) Unmarshal(data []byte) error

type InternalEvent

type InternalEvent watch.Event

InternalEvent makes watch.Event versioned

func (*InternalEvent) GetObjectKind

func (e *InternalEvent) GetObjectKind() unversioned.ObjectKind

Jump to

Keyboard shortcuts

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