mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-12 08:23:58 +02:00
1b4e881d74
* WIP store rewrite * Fix memory store tests * Store hard expiry times rather than duration! * Clarify memory test * Add limit to store interface * Implement suffix option * Don't return nils from noop store * Fix syncmap * Start fixing store service * wip service and cache * Use _ for special characters in cockroachdb namespace * Improve cockroach namespace comment * Use service name as default store namespace * Fixes * Implement Store Scope * Start fixing etcd * implement read and write with expiry and prefix * Fix etcd tests * Fix cockroach store * Fix cloudflare interface * Fix certmagic / cloudflare store * comment lint * cache isn't implemented yet * Only prepare DB staements once Co-authored-by: Ben Toogood <ben@micro.mu> Co-authored-by: ben-toogood <bentoogood@gmail.com>
32 lines
583 B
Go
32 lines
583 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
|
|
}
|