New creates a store from a given directory. If the directory does not exist or is empty, initialize it
(dir string, cfg Config)
| 92 | // New creates a store from a given directory. |
| 93 | // If the directory does not exist or is empty, initialize it |
| 94 | func New(dir string, cfg Config) *ContextStore { |
| 95 | metaRoot := filepath.Join(dir, metadataDir) |
| 96 | tlsRoot := filepath.Join(dir, tlsDir) |
| 97 | |
| 98 | return &ContextStore{ |
| 99 | meta: &metadataStore{ |
| 100 | root: metaRoot, |
| 101 | config: cfg, |
| 102 | }, |
| 103 | tls: &tlsStore{ |
| 104 | root: tlsRoot, |
| 105 | }, |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | // ContextStore implements Store. |
| 110 | type ContextStore struct { |
no outgoing calls