ListNamespace return the list of name of all namespaces
(ctx context.Context)
| 74 | |
| 75 | // ListNamespace return the list of name of all namespaces |
| 76 | func (s *ClusterStore) ListNamespace(ctx context.Context) ([]string, error) { |
| 77 | entries, err := s.e.List(ctx, nsPrefix) |
| 78 | if err != nil { |
| 79 | return nil, err |
| 80 | } |
| 81 | keys := make([]string, len(entries)) |
| 82 | for i, entry := range entries { |
| 83 | keys[i] = entry.Key |
| 84 | } |
| 85 | return keys, nil |
| 86 | } |
| 87 | |
| 88 | // ExistsNamespace return an indicator whether the specified namespace exists |
| 89 | func (s *ClusterStore) ExistsNamespace(ctx context.Context, ns string) (bool, error) { |