1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-12 08:23:58 +02:00
go-micro/store/noop.go
Asim Aslam 4b0e27413e
add Store Close method (#1500)
* add Store Close method

* Update sync store build failure
2020-04-08 09:51:10 +01:00

36 lines
634 B
Go

package store
type noopStore struct{}
func (n *noopStore) Init(opts ...Option) error {
return nil
}
func (n *noopStore) Options() Options {
return Options{}
}
func (n *noopStore) String() string {
return "noop"
}
func (n *noopStore) Read(key string, opts ...ReadOption) ([]*Record, error) {
return []*Record{}, nil
}
func (n *noopStore) Write(r *Record, opts ...WriteOption) error {
return nil
}
func (n *noopStore) Delete(key string, opts ...DeleteOption) error {
return nil
}
func (n *noopStore) List(opts ...ListOption) ([]string, error) {
return []string{}, nil
}
func (n *noopStore) Close() error {
return nil
}