Delete store, this is not a core requirement of microservices, will be included in go-platform
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
package store
|
||||
|
||||
type Store interface {
|
||||
Get(string) (*Item, error)
|
||||
Del(string) error
|
||||
Put(*Item) error
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
Key string
|
||||
Value []byte
|
||||
}
|
||||
|
||||
type options struct{}
|
||||
|
||||
type Option func(*options)
|
||||
|
||||
var (
|
||||
DefaultStore = newConsulStore([]string{})
|
||||
)
|
||||
|
||||
func NewStore(addrs []string, opt ...Option) Store {
|
||||
return newConsulStore(addrs, opt...)
|
||||
}
|
||||
|
||||
func Get(key string) (*Item, error) {
|
||||
return DefaultStore.Get(key)
|
||||
}
|
||||
|
||||
func Del(key string) error {
|
||||
return DefaultStore.Del(key)
|
||||
}
|
||||
|
||||
func Put(item *Item) error {
|
||||
return DefaultStore.Put(item)
|
||||
}
|
Reference in New Issue
Block a user