event

package
v0.0.0-...-6cc5b7d Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2014 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package event provides Registry interface and it's REST implementation for storing Event api objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdRegistry

func NewEtcdRegistry(h tools.EtcdHelper, ttl uint64) generic.Registry

NewEtcdRegistry returns a registry which will store Events in the given EtcdHelper. ttl is the time that Events will be retained by the system.

Types

type REST

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

REST adapts an event registry into apiserver's RESTStorage model.

func NewREST

func NewREST(registry generic.Registry) *REST

NewREST returns a new REST. You must use a registry created by NewEtcdRegistry unless you're testing.

func (*REST) Create

func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)

func (*REST) Delete

func (rs *REST) Delete(ctx api.Context, id string) (<-chan apiserver.RESTResult, error)

func (*REST) Get

func (rs *REST) Get(ctx api.Context, id string) (runtime.Object, error)

func (*REST) List

func (rs *REST) List(ctx api.Context, label, field labels.Selector) (runtime.Object, error)

func (*REST) New

func (*REST) New() runtime.Object

New returns a new api.Event

func (*REST) Update

func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)

Update returns an error: Events are not mutable.

func (*REST) Watch

func (rs *REST) Watch(ctx api.Context, label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)

Watch returns Events events via a watch.Interface. It implements apiserver.ResourceWatcher.

Jump to

Keyboard shortcuts

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