github.com/15mga/kiwi@v0.0.2-0.20240324021231-b95d5c3ac751/core/node_test_.go (about)

     1  package core
     2  
     3  import (
     4  	"github.com/15mga/kiwi"
     5  	"github.com/15mga/kiwi/util"
     6  )
     7  
     8  func InitNodeTest() {
     9  	kiwi.SetNode(&nodeTest{
    10  		nodeLocal: nodeLocal{newNodeBase()},
    11  	})
    12  }
    13  
    14  type nodeTest struct {
    15  	nodeLocal
    16  }
    17  
    18  func (n *nodeTest) Push(pus kiwi.ISndPush) {
    19  	kiwi.Debug("push", util.M{
    20  		"pid":  pus.Pid(),
    21  		"tid":  pus.Tid(),
    22  		"svc":  pus.Svc(),
    23  		"code": pus.Code(),
    24  		"head": pus.Head(),
    25  		"msg":  pus.Msg(),
    26  	})
    27  }
    28  
    29  func (n *nodeTest) PushNode(nodeId int64, pus kiwi.ISndPush) {
    30  	//kiwi.Debug("push node", util.M{
    31  	//	"node id": nodeId,
    32  	//	"pid":     pus.Pid(),
    33  	//	"tid":     pus.Tid(),
    34  	//	"svc":     pus.Svc(),
    35  	//	"code":    pus.Code(),
    36  	//	"head":    pus.Head(),
    37  	//	"msg":     pus.Msg(),
    38  	//})
    39  }