// VaultAccessor returns the given Vault accessor
VaultAccessor returns the given Vault accessor
// VaultAccessor returns the given Vault accessor
func (s *StateStore) VaultAccessor(ws memdb.WatchSet, accessor string) (*structs.VaultAccessor, error) {
	txn := s.db.Txn(false)
	watchCh, existing, err := txn.FirstWatch("vault_accessors", "id", accessor)
	if err != nil {
		return nil, fmt.Errorf("accessor lookup failed: %v", err)
	}
	ws.Add(watchCh)
	if existing != nil {
		return existing.(*structs.VaultAccessor), nil
	}
	return nil, nil
}
func ( s * StateStore ) VaultAccessor ( ws memdb . WatchSet , accessor string ) ( * structs . VaultAccessor , error ) { txn := s . db . Txn ( false ) watchCh , existing , err := txn . FirstWatch ( " " , " " , accessor ) if err != nil { return nil , fmt . Errorf ( " " , err ) } ws . Add ( watchCh ) if existing != nil { return existing . ( * structs . VaultAccessor ) , nil } return nil , nil }
VaultAccessor returns the given Vault accessor
VaultAccessor returns the given Vault accessor