// EvalByID is used to lookup an eval by its ID
EvalByID is used to lookup an eval by its ID
// EvalByID is used to lookup an eval by its ID
func (s *StateStore) EvalByID(ws memdb.WatchSet, id string) (*structs.Evaluation, error) {
	txn := s.db.Txn(false)
	watchCh, existing, err := txn.FirstWatch("evals", "id", id)
	if err != nil {
		return nil, fmt.Errorf("eval lookup failed: %v", err)
	}
	ws.Add(watchCh)
	if existing != nil {
		return existing.(*structs.Evaluation), nil
	}
	return nil, nil
}
func ( s * StateStore ) EvalByID ( ws memdb . WatchSet , id string ) ( * structs . Evaluation , error ) { txn := s . db . Txn ( false ) watchCh , existing , err := txn . FirstWatch ( " " , " " , id ) if err != nil { return nil , fmt . Errorf ( " " , err ) } ws . Add ( watchCh ) if existing != nil { return existing . ( * structs . Evaluation ) , nil } return nil , nil }
EvalByID is used to lookup an eval by its ID
EvalByID is used to lookup an eval by its ID