Exemple #1
0
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
}
Exemple #2
0
func NewTestNode(name string, port uint16) *TestNode {
	base := base.NewBase(name, port)
	link := NewLinkMgr(base)

	return &TestNode{
		Base: base,
		Link: link,
	}
}
Exemple #3
0
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
}
Exemple #4
0
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
}
Exemple #5
0
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
}