1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-18 08:26:38 +02:00
go-micro/store/store.go

33 lines
521 B
Go

package store
type Store interface {
Get(string) (Item, error)
Del(string) error
Put(Item) error
NewItem(string, []byte) Item
}
type options struct{}
type Options func(*options)
var (
DefaultStore = NewConsulStore([]string{})
)
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)
}
func NewItem(key string, value []byte) Item {
return DefaultStore.NewItem(key, value)
}