func (s *StateStore) AllocsByIDPrefix(ws memdb.WatchSet, id string) (memdb.ResultIterator, error) {
	txn := s.db.Txn(false)

	iter, err := txn.Get("allocs", "id_prefix", id)
	if err != nil {
		return nil, fmt.Errorf("alloc lookup failed: %v", err)
	}

	ws.Add(iter.WatchCh())

	return iter, nil
}
// AllocsByIDPrefix is used to lookup allocs by prefix
AllocsByIDPrefix is used to lookup allocs by prefix
// AllocsByIDPrefix is used to lookup allocs by prefix
func (s *StateStore) AllocsByIDPrefix(ws memdb.WatchSet, id string) (memdb.ResultIterator, error) {
	txn := s.db.Txn(false)
	iter, err := txn.Get("allocs", "id_prefix", id)
	if err != nil {
		return nil, fmt.Errorf("alloc lookup failed: %v", err)
	}
	ws.Add(iter.WatchCh())
	return iter, nil
}
func ( s * StateStore ) AllocsByIDPrefix ( ws memdb . WatchSet , id string ) ( memdb . ResultIterator , error ) { txn := s . db . Txn ( false ) iter , err := txn . Get ( " " , " " , id ) if err != nil { return nil , fmt . Errorf ( " " , err ) } ws . Add ( iter . WatchCh ( ) ) return iter , nil }
AllocsByIDPrefix is used to lookup allocs by prefix
AllocsByIDPrefix is used to lookup allocs by prefix