( ctx context.Context, workspaceID string, name string, )
| 936 | } |
| 937 | |
| 938 | func (s daemonMemoryProviderService) Select( |
| 939 | ctx context.Context, |
| 940 | workspaceID string, |
| 941 | name string, |
| 942 | ) (contract.MemoryProviderPayload, error) { |
| 943 | if s.registry == nil { |
| 944 | return contract.MemoryProviderPayload{}, errors.New("daemon: memory provider registry is not configured") |
| 945 | } |
| 946 | if err := s.registry.SetActive(ctx, workspaceID, name); err != nil { |
| 947 | if isMemoryProviderNotFound(err) { |
| 948 | return contract.MemoryProviderPayload{}, fmt.Errorf("%w: %w", os.ErrNotExist, err) |
| 949 | } |
| 950 | return contract.MemoryProviderPayload{}, err |
| 951 | } |
| 952 | return s.Get(ctx, workspaceID, name) |
| 953 | } |
| 954 | |
| 955 | func (s daemonMemoryProviderService) Enable( |
| 956 | ctx context.Context, |
nothing calls this directly
no test coverage detected