sdk

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 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)

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 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

Jump to

Keyboard shortcuts

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