コード例 #1
0
ファイル: node.go プロジェクト: gechong/cockroach
// 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
ファイル: node.go プロジェクト: JonathanHub/cockroach
// 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
ファイル: node.go プロジェクト: l2x/cockroach
// 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
ファイル: node.go プロジェクト: guanqun/cockroach
// 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
ファイル: node.go プロジェクト: Hellblazer/cockroach
// 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{}),
	}
}