func (s *StateStore) VaultAccessorsByAlloc(ws memdb.WatchSet, allocID string) ([]*structs.VaultAccessor, error) {
	txn := s.db.Txn(false)

	// Get an iterator over the accessors
	iter, err := txn.Get("vault_accessors", "alloc_id", allocID)
	if err != nil {
		return nil, err
	}

	ws.Add(iter.WatchCh())

	var out []*structs.VaultAccessor
	for {
		raw := iter.Next()
		if raw == nil {
			break
		}
		out = append(out, raw.(*structs.VaultAccessor))
	}
	return out, nil
}
// VaultAccessorsByAlloc returns all the Vault accessors by alloc id
VaultAccessorsByAlloc returns all the Vault accessors by alloc id
// VaultAccessorsByAlloc returns all the Vault accessors by alloc id
func (s *StateStore) VaultAccessorsByAlloc(ws memdb.WatchSet, allocID string) ([]*structs.VaultAccessor, error) {
	txn := s.db.Txn(false)
	iter, err := txn.Get("vault_accessors", "alloc_id", allocID)
	if err != nil {
		return nil, err
	}
	ws.Add(iter.WatchCh())
	var out []*structs.VaultAccessor
	for {
		raw := iter.Next()
		if raw == nil {
			break
		}
		out = append(out, raw.(*structs.VaultAccessor))
	}
	return out, nil
}
func ( s * StateStore ) VaultAccessorsByAlloc ( ws memdb . WatchSet , allocID string ) ( [ ] * structs . VaultAccessor , error ) { txn := s . db . Txn ( false ) iter , err := txn . Get ( " " , " " , allocID ) if err != nil { return nil , err } ws . Add ( iter . WatchCh ( ) ) var out [ ] * structs . VaultAccessor for { raw := iter . Next ( ) if raw == nil { break } out = append ( out , raw . ( * structs . VaultAccessor ) ) } return out , nil }
VaultAccessorsByAlloc returns all the Vault accessors by alloc id
VaultAccessorsByAlloc returns all the Vault accessors by alloc id
// Get an iterator over the accessors