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 stat map[string]Counter
33 consumers []MessageConsumer
35 readyCbParams interface{}
45 func (meid *RMRMeid) String() string {
48 if len(meid.PlmnID) > 0 {
49 str += pad + "PlmnID=" + meid.PlmnID
52 if len(meid.EnbID) > 0 {
53 str += pad + "EnbID=" + meid.EnbID
56 if len(meid.RanName) > 0 {
57 str += pad + "RanName=" + meid.RanName
64 type MessageConsumerFunc func(*RMRParams) error
66 func (fn MessageConsumerFunc) Consume(params *RMRParams) error {
70 type MessageConsumer interface {
71 Consume(params *RMRParams) error
74 type PortData struct {
85 type SymptomDataParams struct {
92 // @todo: read these from config or somewhere else
94 SERVICE_HTTP = "SERVICE_%s_%s_HTTP_PORT"
95 SERVICE_RMR = "SERVICE_%s_%s_RMR_PORT"
96 CONFIG_PATH = "/ric/v1/config"
97 REGISTER_PATH = "http://service-%s-appmgr-http.%s:8080/ric/v1/register"
98 DEREGISTER_PATH = "http://service-%s-appmgr-http.%s:8080/ric/v1/deregister"
99 DEFAULT_PLT_NS = "ricplt"
100 DEFAULT_XAPP_NS = "ricxapp"