X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fstub%2Fmangos.go;h=e795c9f3473ecff19dd7d9c7996fdd39677070db;hb=b177846d915b7a70c97a74ca73c26d0964fd6a49;hp=062064896102b347ba708638b4f15f97b20177de;hpb=92162653c9741f2417d1a36ec1c211d6863d0a68;p=ric-plt%2Frtmgr.git diff --git a/pkg/stub/mangos.go b/pkg/stub/mangos.go index 0620648..e795c9f 100644 --- a/pkg/stub/mangos.go +++ b/pkg/stub/mangos.go @@ -14,11 +14,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + This source code is part of the near-RT RIC (RAN Intelligent Controller) + platform project (RICP). + ================================================================================== */ /* Mnemonic: mangos.go - Abstract: + Abstract: Date: 3 May 2019 */ @@ -28,12 +32,12 @@ import "errors" type MangosMessage struct { Header []byte - Body []byte - Pipe MangosPipe - bbuf []byte - hbuf []byte - bsize int - pool interface {} + Body []byte + Pipe MangosPipe + bbuf []byte + hbuf []byte + bsize int + pool interface{} } type MangosProtocolInfo struct { @@ -46,7 +50,6 @@ type MangosProtocolInfo struct { // Mangos Listener Stub type MangosListener struct { - } func (l MangosListener) Listen() error { @@ -65,14 +68,14 @@ func (l MangosListener) SetOption(s string, i interface{}) error { return nil } -func (l MangosListener) GetOption(s string) (interface{},error) { +func (l MangosListener) GetOption(s string) (interface{}, error) { return nil, nil } // Mangos Dialer Stub type MangosDialer struct { - } +} func (d MangosDialer) Open() error { return nil @@ -90,14 +93,13 @@ func (d MangosDialer) SetOption(s string, i interface{}) error { return nil } -func (d MangosDialer) GetOption(s string) (interface{},error) { +func (d MangosDialer) GetOption(s string) (interface{}, error) { return nil, nil } // Mangos Context Stub type MangosContext struct { - } func (c MangosContext) Close() error { @@ -108,7 +110,7 @@ func (c MangosContext) SetOption(s string, i interface{}) error { return nil } -func (c MangosContext) GetOption(s string) (interface{},error) { +func (c MangosContext) GetOption(s string) (interface{}, error) { return nil, nil } @@ -117,7 +119,7 @@ func (c MangosContext) Send(b []byte) error { } func (c MangosContext) Recv() ([]byte, error) { - return make([]byte,0), nil + return make([]byte, 0), nil } func (c MangosContext) SendMsg(*MangosMessage) error { @@ -131,7 +133,6 @@ func (c MangosContext) RecvMsg() (*MangosMessage, error) { // Mangos Pipe Stub type MangosPipe struct { - } func (p MangosPipe) ID() uint32 { @@ -154,7 +155,7 @@ func (p MangosPipe) Address() string { return "" } -func (p MangosPipe) GetOption(s string) (interface{},error) { +func (p MangosPipe) GetOption(s string) (interface{}, error) { return nil, nil } @@ -165,9 +166,9 @@ type PipeEventHook func(int, MangosPipe) // Mangos Socket Stub type MangosSocket struct { - GenerateSocketCloseError bool - GenerateSocketSendError bool - GenerateSocketDialError bool + GenerateSocketCloseError bool + GenerateSocketSendError bool + GenerateSocketDialError bool GenerateSocketListenError bool } @@ -190,7 +191,7 @@ func (s MangosSocket) Send(b []byte) error { } func (s MangosSocket) Recv() ([]byte, error) { - return make([]byte,0), nil + return make([]byte, 0), nil } func (s MangosSocket) SendMsg(*MangosMessage) error { @@ -238,7 +239,7 @@ func (s MangosSocket) SetOption(t string, i interface{}) error { return nil } -func (s MangosSocket) GetOption(t string) (interface{},error) { +func (s MangosSocket) GetOption(t string) (interface{}, error) { return nil, nil } @@ -253,7 +254,6 @@ func (s MangosSocket) SetPipeEventHook(p PipeEventHook) PipeEventHook { // Mangos ProtocolPipe Stub type MangosProtocolPipe struct { - } func (p MangosProtocolPipe) ID() uint32 { @@ -275,7 +275,6 @@ func (p MangosProtocolPipe) RecvMsg() *MangosMessage { // Mangos ProtocolContext Stub type MangosProtocolContext struct { - } func (p MangosProtocolContext) Close() error {