2 Copyright 2018 The Kubernetes Authors.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
20 "k8s.io/apimachinery/pkg/apis/meta/v1"
21 "k8s.io/apimachinery/pkg/runtime"
24 // CreateEvent is an event where a Kubernetes object was created. CreateEvent should be generated
25 // by a source.Source and transformed into a reconcile.Request by an handler.EventHandler.
26 type CreateEvent struct {
27 // Meta is the ObjectMeta of the Kubernetes Type that was created
30 // Object is the object from the event
34 // UpdateEvent is an event where a Kubernetes object was updated. UpdateEvent should be generated
35 // by a source.Source and transformed into a reconcile.Request by an handler.EventHandler.
36 type UpdateEvent struct {
37 // MetaOld is the ObjectMeta of the Kubernetes Type that was updated (before the update)
40 // ObjectOld is the object from the event
41 ObjectOld runtime.Object
43 // MetaNew is the ObjectMeta of the Kubernetes Type that was updated (after the update)
46 // ObjectNew is the object from the event
47 ObjectNew runtime.Object
50 // DeleteEvent is an event where a Kubernetes object was deleted. DeleteEvent should be generated
51 // by a source.Source and transformed into a reconcile.Request by an handler.EventHandler.
52 type DeleteEvent struct {
53 // Meta is the ObjectMeta of the Kubernetes Type that was deleted
56 // Object is the object from the event
59 // DeleteStateUnknown is true if the Delete event was missed but we identified the object
60 // as having been deleted.
61 DeleteStateUnknown bool
64 // GenericEvent is an event where the operation type is unknown (e.g. polling or event originating outside the cluster).
65 // GenericEvent should be generated by a source.Source and transformed into a reconcile.Request by an
66 // handler.EventHandler.
67 type GenericEvent struct {
68 // Meta is the ObjectMeta of a Kubernetes Type this event is for
71 // Object is the object from the event