summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go')
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go74
1 files changed, 37 insertions, 37 deletions
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
index c4ac11006..bec36116e 100644
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
@@ -1,5 +1,5 @@
/*
-Copyright 2017 The Kubernetes Authors.
+Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,11 +17,11 @@ limitations under the License.
package v1
import (
+ v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
- v1 "k8s.io/client-go/pkg/api/v1"
rest "k8s.io/client-go/rest"
)
@@ -58,6 +58,41 @@ func newEvents(c *CoreV1Client, namespace string) *events {
}
}
+// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
+func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Events that match those selectors.
+func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
+ result = &v1.EventList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested events.
+func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
func (c *events) Create(event *v1.Event) (result *v1.Event, err error) {
result = &v1.Event{}
@@ -105,41 +140,6 @@ func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions me
Error()
}
-// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
-func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) {
- result = &v1.Event{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("events").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Events that match those selectors.
-func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
- result = &v1.EventList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested events.
-func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("events").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
// Patch applies the patch and returns the patched event.
func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
result = &v1.Event{}