sdk

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(handler sdkHandler.Handler)

Handle registers the handler for all events. In the future, we would have a mux-pattern to dispatch events to matched handlers.

func Run

func Run(ctx context.Context)

Run starts the process of Watching resources, handling Events, and processing Actions

func Watch

func Watch(apiVersion, kind, namespace string, resyncPeriod int)

Watch watches for changes on the given resource. apiVersion for a resource is of the format "Group/Version" except for the "Core" group whose APIVersion is just "v1". For e.g:

  • Deployments have Group "apps" and Version "v1beta2" giving the APIVersion "apps/v1beta2"
  • Pods have Group "Core" and Version "v1" giving the APIVersion "v1"
  • The custom resource Memcached might have Group "cache.example.com" and Version "v1alpha1" giving the APIVersion "cache.example.com/v1alpha1"

kind is the Kind of the resource, e.g "Pod" for pods resyncPeriod is the time period in seconds for how often an event with the latest resource version will be sent to the handler, even if there is no change.

  • 0 means no periodic events will be sent

Consult the API reference for the Group, Version and Kind of a resource: https://kubernetes.io/docs/reference/ namespace is the Namespace to watch for the resource TODO: support opts for specifying label selector

Types

This section is empty.

Directories

Path Synopsis
Package action contains a set of APIs for mutating kubernetes objects.
Package action contains a set of APIs for mutating kubernetes objects.
Package query contains a set of APIs for accessing kubernetes objects.
Package query contains a set of APIs for accessing kubernetes objects.

Jump to

Keyboard shortcuts

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