Change store.Sync to store.List

This commit is contained in:
Asim Aslam
2019-10-23 22:05:39 +01:00
parent ecac392dbe
commit 82f94c7861
10 changed files with 216 additions and 220 deletions

View File

@@ -4,8 +4,6 @@ package store
import (
"errors"
"time"
"github.com/micro/go-micro/config/options"
)
var (
@@ -14,16 +12,14 @@ var (
// Store is a data storage interface
type Store interface {
// embed options
options.Options
// Sync all the known records
Sync() ([]*Record, error)
// List all the known records
List() ([]*Record, error)
// Read a record with key
Read(keys ...string) ([]*Record, error)
Read(key ...string) ([]*Record, error)
// Write a record
Write(recs ...*Record) error
Write(rec ...*Record) error
// Delete a record with key
Delete(keys ...string) error
Delete(key ...string) error
}
// Record represents a data record