2 ==================================================================================
3 Copyright (c) 2019 AT&T Intellectual Property.
4 Copyright (c) 2019 Nokia
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================================
26 type RMRClient struct {
28 context unsafe.Pointer
32 statc map[string]Counter
33 statg map[string]Gauge
34 consumers []MessageConsumer
36 readyCbParams interface{}
46 func (meid *RMRMeid) String() string {
49 if len(meid.PlmnID) > 0 {
50 str += pad + "PlmnID=" + meid.PlmnID
53 if len(meid.EnbID) > 0 {
54 str += pad + "EnbID=" + meid.EnbID
57 if len(meid.RanName) > 0 {
58 str += pad + "RanName=" + meid.RanName
65 type MessageConsumerFunc func(*RMRParams) error
67 func (fn MessageConsumerFunc) Consume(params *RMRParams) error {
71 type MessageConsumer interface {
72 Consume(params *RMRParams) error
75 type PortData struct {
86 type SymptomDataParams struct {
93 // @todo: read these from config or somewhere else
95 SERVICE_HTTP = "SERVICE_%s_%s_HTTP_PORT"
96 SERVICE_RMR = "SERVICE_%s_%s_RMR_PORT"
97 CONFIG_PATH = "/ric/v1/config"
98 REGISTER_PATH = "http://service-%s-appmgr-http.%s:8080/ric/v1/register"
99 DEREGISTER_PATH = "http://service-%s-appmgr-http.%s:8080/ric/v1/deregister"
100 DEFAULT_PLT_NS = "ricplt"
101 DEFAULT_XAPP_NS = "ricxapp"