func (s *StateStore) NodeByID(ws memdb.WatchSet, nodeID string) (*structs.Node, error) {
	txn := s.db.Txn(false)

	watchCh, existing, err := txn.FirstWatch("nodes", "id", nodeID)
	if err != nil {
		return nil, fmt.Errorf("node lookup failed: %v", err)
	}
	ws.Add(watchCh)

	if existing != nil {
		return existing.(*structs.Node), nil
	}
	return nil, nil
}
// NodeByID is used to lookup a node by ID
NodeByID is used to lookup a node by ID
// NodeByID is used to lookup a node by ID
func (s *StateStore) NodeByID(ws memdb.WatchSet, nodeID string) (*structs.Node, error) {
	txn := s.db.Txn(false)
	watchCh, existing, err := txn.FirstWatch("nodes", "id", nodeID)
	if err != nil {
		return nil, fmt.Errorf("node lookup failed: %v", err)
	}
	ws.Add(watchCh)
	if existing != nil {
		return existing.(*structs.Node), nil
	}
	return nil, nil
}
func ( s * StateStore ) NodeByID ( ws memdb . WatchSet , nodeID string ) ( * structs . Node , error ) { txn := s . db . Txn ( false ) watchCh , existing , err := txn . FirstWatch ( " " , " " , nodeID ) if err != nil { return nil , fmt . Errorf ( " " , err ) } ws . Add ( watchCh ) if existing != nil { return existing . ( * structs . Node ) , nil } return nil , nil }
NodeByID is used to lookup a node by ID
NodeByID is used to lookup a node by ID