ForWorkspace returns a clone of the store bound to the supplied workspace root.
(workspaceRoot string)
| 190 | |
| 191 | // ForWorkspace returns a clone of the store bound to the supplied workspace root. |
| 192 | func (s *Store) ForWorkspace(workspaceRoot string) *Store { |
| 193 | clone := *s |
| 194 | clone.workspaceRoot = canonicalWorkspaceRoot(workspaceRoot) |
| 195 | clone.workspaceDir = workspaceMemoryDir(clone.workspaceRoot) |
| 196 | return &clone |
| 197 | } |
| 198 | |
| 199 | // ForAgent returns a clone of the store bound to one agent memory tier. |
| 200 | func (s *Store) ForAgent(workspaceID string, agentName string, tier memcontract.AgentTier) *Store { |