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.
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.
"nanomsg.org/go/mangos/v2"
"nanomsg.org/go/mangos/v2/protocol/push"
_ "nanomsg.org/go/mangos/v2/transport/all"
"nanomsg.org/go/mangos/v2"
"nanomsg.org/go/mangos/v2/protocol/push"
_ "nanomsg.org/go/mangos/v2/transport/all"
socket, err := push.NewSocket()
if err != nil {
return nil, errors.New("can't create new push socket due to:" + err.Error())
socket, err := push.NewSocket()
if err != nil {
return nil, errors.New("can't create new push socket due to:" + err.Error())
- rtmgr.Logger.Debug("Invoked sbi.AddEndpoint")
- rtmgr.Logger.Debug("args: %v", (*ep))
+ xapp.Logger.Debug("Invoked sbi.AddEndpoint")
+ xapp.Logger.Debug("args: %v", *ep)
socket, err = c.NewSocket()
if err != nil {
return errors.New("can't add new socket to endpoint:" + ep.Uuid + " due to: " + err.Error())
socket, err = c.NewSocket()
if err != nil {
return errors.New("can't add new socket to endpoint:" + ep.Uuid + " due to: " + err.Error())
- rtmgr.Logger.Debug("Invoked sbi. DeleteEndpoint")
- rtmgr.Logger.Debug("args: %v", (*ep))
+ xapp.Logger.Debug("Invoked sbi. DeleteEndpoint")
+ xapp.Logger.Debug("args: %v", *ep)
if err := ep.Socket.(NngSocket).Close(); err != nil {
return errors.New("can't close push socket of endpoint:" + ep.Uuid + " due to: " + err.Error())
}
if err := ep.Socket.(NngSocket).Close(); err != nil {
return errors.New("can't close push socket of endpoint:" + ep.Uuid + " due to: " + err.Error())
}
NOTE: Asynchronous dial starts a goroutine which keep maintains the connection to the given endpoint
*/
func (c *NngPush) dial(ep *rtmgr.Endpoint) error {
NOTE: Asynchronous dial starts a goroutine which keep maintains the connection to the given endpoint
*/
func (c *NngPush) dial(ep *rtmgr.Endpoint) error {
- rtmgr.Logger.Debug("Dialing to endpoint: " + ep.Uuid)
- uri := DEFAULT_NNG_PIPELINE_SOCKET_PREFIX + ep.Ip + ":" + strconv.Itoa(DEFAULT_NNG_PIPELINE_SOCKET_NUMBER)
+ xapp.Logger.Debug("Dialing to endpoint: " + ep.Uuid)
+ uri := DefaultNngPipelineSocketPrefix + ep.Ip + ":" + strconv.Itoa(DefaultNngPipelineSocketNumber)
options := make(map[string]interface{})
options[mangos.OptionDialAsynch] = true
if err := ep.Socket.(NngSocket).DialOptions(uri, options); err != nil {
options := make(map[string]interface{})
options[mangos.OptionDialAsynch] = true
if err := ep.Socket.(NngSocket).DialOptions(uri, options); err != nil {
- rtmgr.Logger.Debug("Invoked: sbi.DistributeAll")
- rtmgr.Logger.Debug("args: %v", (*policies))
+ xapp.Logger.Debug("Invoked: sbi.DistributeAll")
+ xapp.Logger.Debug("args: %v", *policies)
for _, pe := range *policies {
if err := ep.Socket.(NngSocket).Send([]byte(pe)); err != nil {
for _, pe := range *policies {
if err := ep.Socket.(NngSocket).Send([]byte(pe)); err != nil {