Пример #1
0
// NewNode returns a new instance of Node.
func NewNode(ctx storage.StoreContext) *Node {
	return &Node{
		ctx:    ctx,
		status: status.NewNodeStatusMonitor(),
		stores: storage.NewStores(),
	}
}
Пример #2
0
// NewNode returns a new instance of Node.
func NewNode(ctx storage.StoreContext) *Node {
	return &Node{
		ctx:     ctx,
		status:  status.NewNodeStatusMonitor(),
		lSender: kv.NewLocalSender(),
	}
}
Пример #3
0
// NewNode returns a new instance of Node.
func NewNode(ctx storage.StoreContext, metaRegistry *metric.Registry, stopper *stop.Stopper) *Node {
	return &Node{
		ctx:     ctx,
		stopper: stopper,
		status:  status.NewNodeStatusMonitor(metaRegistry),
		stores:  storage.NewStores(ctx.Clock),
	}
}
Пример #4
0
// NewNode returns a new instance of Node.
func NewNode(ctx storage.StoreContext, registry *metric.Registry, stopper *stop.Stopper, subRegistries []status.NodeSubregistry) *Node {
	return &Node{
		ctx:     ctx,
		stopper: stopper,
		status:  status.NewNodeStatusMonitor(registry, subRegistries),
		stores:  storage.NewStores(ctx.Clock),
	}
}
Пример #5
0
// NewNode returns a new instance of Node.
func NewNode(ctx storage.StoreContext) *Node {
	return &Node{
		ctx:           ctx,
		status:        status.NewNodeStatusMonitor(),
		lSender:       kv.NewLocalSender(),
		completedScan: sync.NewCond(&sync.Mutex{}),
	}
}