| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
package storage |
| 5 |
|
| 6 |
import "context" |
| 7 |
|
| 8 |
type nopClient struct{} |
| 9 |
|
| 10 |
var nopClientInstance Client = &nopClient{} |
| 11 |
|
| 12 |
|
| 13 |
func NewNopClient() Client { |
| 14 |
return nopClientInstance |
| 15 |
} |
| 16 |
|
| 17 |
|
| 18 |
func (c nopClient) Get(context.Context, string) ([]byte, error) { |
| 19 |
return nil, nil |
| 20 |
} |
| 21 |
|
| 22 |
|
| 23 |
func (c nopClient) Set(context.Context, string, []byte) error { |
| 24 |
return nil |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
func (c nopClient) Delete(context.Context, string) error { |
| 29 |
return nil |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
func (c nopClient) Close(context.Context) error { |
| 34 |
return nil |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
func (c nopClient) Batch(context.Context, ...*Operation) error { |
| 39 |
return nil |
| 40 |
} |