blob: e0538b593d5d041961c233dc68f941e3b21ad9c5 [file] [log] [blame]
khenaidoo7d3c5582021-08-11 18:09:44 -04001/*
Joey Armstrongacd8d182024-01-28 16:01:00 -05002 * Copyright 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors
khenaidoo7d3c5582021-08-11 18:09:44 -04003
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 */
16
17package eventif
18
19import (
20 "context"
21
22 "github.com/opencord/voltha-protos/v5/go/voltha"
23)
24
25// EventProxy interface for eventproxy
26type EventProxy interface {
27 SendDeviceEvent(ctx context.Context, deviceEvent *voltha.DeviceEvent, category EventCategory,
28 subCategory EventSubCategory, raisedTs int64) error
kesavand510a31c2022-03-16 17:12:12 +053029 SendDeviceEventWithKey(ctx context.Context, deviceEvent *voltha.DeviceEvent, category EventCategory,
30 subCategory EventSubCategory, raisedTs int64, key string) error
khenaidoo7d3c5582021-08-11 18:09:44 -040031 SendKpiEvent(ctx context.Context, id string, deviceEvent *voltha.KpiEvent2, category EventCategory,
32 subCategory EventSubCategory, raisedTs int64) error
33 SendRPCEvent(ctx context.Context, id string, deviceEvent *voltha.RPCEvent, category EventCategory,
34 subCategory *EventSubCategory, raisedTs int64) error
35 EnableLivenessChannel(ctx context.Context, enable bool) chan bool
36 SendLiveness(ctx context.Context) error
37 Start() error
38 Stop()
39}
40
41const (
42 EventTypeVersion = "0.1"
43)
44
45type (
46 EventType = voltha.EventType_Types
47 EventCategory = voltha.EventCategory_Types
48 EventSubCategory = voltha.EventSubCategory_Types
49)