blob: acce2152d81a2a588f98a8ea552d2aaeefd5b5b4 [file] [log] [blame]
Jian Lid893a662019-02-19 11:18:54 +09001/*
2 * Copyright 2019-present Open Networking Foundation
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16package org.onosproject.k8snetworking.api;
17
18import io.fabric8.kubernetes.api.model.Endpoints;
19import org.onosproject.event.AbstractEvent;
20
21/**
22 * Describes kubernetes endpoints event.
23 */
24public class K8sEndpointsEvent extends AbstractEvent<K8sEndpointsEvent.Type, Endpoints> {
25
26 /**
27 * Creates an event of a given type for the specified kubernetes endpoints.
28 *
29 * @param type kubernetes endpoints event type
30 * @param subject kubernetes endpoints
31 */
32 public K8sEndpointsEvent(Type type, Endpoints subject) {
33 super(type, subject);
34 }
35
36 /**
37 * Kubernetes endpoints events.
38 */
39 public enum Type {
40
41 /**
42 * Signifies that a new kubernetes endpoints is created.
43 */
44 K8S_ENDPOINTS_CREATED,
45
46 /**
47 * Signifies that the kubernetes endpoints is updated.
48 */
49 K8S_ENDPOINTS_UPDATED,
50
51 /**
52 * Signifies that the kubernetes endpoints is removed.
53 */
54 K8S_ENDPOINTS_REMOVED,
55 }
56}