github.com/micro/go-micro/v2@v2.9.1/store/noop.go (about)

     1  package store
     2  
     3  type noopStore struct{}
     4  
     5  func (n *noopStore) Init(opts ...Option) error {
     6  	return nil
     7  }
     8  
     9  func (n *noopStore) Options() Options {
    10  	return Options{}
    11  }
    12  
    13  func (n *noopStore) String() string {
    14  	return "noop"
    15  }
    16  
    17  func (n *noopStore) Read(key string, opts ...ReadOption) ([]*Record, error) {
    18  	return []*Record{}, nil
    19  }
    20  
    21  func (n *noopStore) Write(r *Record, opts ...WriteOption) error {
    22  	return nil
    23  }
    24  
    25  func (n *noopStore) Delete(key string, opts ...DeleteOption) error {
    26  	return nil
    27  }
    28  
    29  func (n *noopStore) List(opts ...ListOption) ([]string, error) {
    30  	return []string{}, nil
    31  }
    32  
    33  func (n *noopStore) Close() error {
    34  	return nil
    35  }