( ctx context.Context, workspaceID string, )
| 895 | } |
| 896 | |
| 897 | func (s daemonMemoryProviderService) List( |
| 898 | ctx context.Context, |
| 899 | workspaceID string, |
| 900 | ) ([]contract.MemoryProviderPayload, error) { |
| 901 | if s.registry == nil { |
| 902 | return nil, errors.New("daemon: memory provider registry is not configured") |
| 903 | } |
| 904 | active, activeErr := s.registry.Select(ctx, workspaceID, "") |
| 905 | if activeErr != nil && !isMemoryProviderNotFound(activeErr) { |
| 906 | return nil, activeErr |
| 907 | } |
| 908 | registrations := s.registry.List() |
| 909 | payloads := make([]contract.MemoryProviderPayload, 0, len(registrations)) |
| 910 | for _, registration := range registrations { |
| 911 | payloads = append(payloads, memoryProviderPayload(registration, registration.Name == active.Name)) |
| 912 | } |
| 913 | return payloads, nil |
| 914 | } |
| 915 | |
| 916 | func (s daemonMemoryProviderService) Get( |
| 917 | ctx context.Context, |
nothing calls this directly
no test coverage detected