func NewTestNode(name string, port uint16) *DataMgr { base := base.NewBase(name, port) link := link.NewLinkMgr(base) sync := sync.NewSyncMgr(link) meta := meta.NewMetaMgr(sync) data := NewDataMgr("/tmp/wtf/"+name, meta) data.Run() return data }
func NewTestNode(name string, port uint16) *TestNode { base := base.NewBase(name, port) link := NewLinkMgr(base) return &TestNode{ Base: base, Link: link, } }
func NewTestNode(name string, linkPort uint16, apiPort uint16) *ApiMgr { base := base.NewBase(name, linkPort) link := link.NewLinkMgr(base) sync := sync.NewSyncMgr(link) meta := meta.NewMetaMgr(sync) data := data.NewDataMgr("/tmp/data/"+name, meta) api := NewApiMgr("localhost", linkPort, apiPort, data) api.Run() return api }
func NewTestNode(name string, port uint16) *TestNode { base := base.NewBase(name, port) link := link.NewLinkMgr(base) sync := NewSyncMgr(link) tn := &TestNode{ log: base.Log, port: base.Port, ident: base.Ident, link: link, sync: sync, } tn.sync.SetSink(RTData, tn.OnData) tn.sync.Run() return tn }
func NewTestNode(name string, port uint16) *TestNode { base := base.NewBase(name, port) link := link.NewLinkMgr(base) sync := sync.NewSyncMgr(link) meta := NewMetaMgr(sync) tn := &TestNode{ id: base.Ident, port: base.Port, log: base.Log, link: link, sync: sync, meta: meta, } tn.meta.Run() return tn }