(appConfig *config.ApplicationConfig, ml *model.ModelLoader)
| 58 | } |
| 59 | |
| 60 | func NewGalleryService(appConfig *config.ApplicationConfig, ml *model.ModelLoader) *GalleryService { |
| 61 | return &GalleryService{ |
| 62 | appConfig: appConfig, |
| 63 | ModelGalleryChannel: make(chan ManagementOp[gallery.GalleryModel, gallery.ModelConfig]), |
| 64 | BackendGalleryChannel: make(chan ManagementOp[gallery.GalleryBackend, any]), |
| 65 | modelLoader: ml, |
| 66 | modelManager: NewLocalModelManager(appConfig, ml), |
| 67 | backendManager: NewLocalBackendManager(appConfig, ml), |
| 68 | statuses: make(map[string]*OpStatus), |
| 69 | cancellations: make(map[string]context.CancelFunc), |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // SetModelManager replaces the model manager (e.g. with a distributed implementation). |
| 74 | func (g *GalleryService) SetModelManager(m ModelManager) { |
no test coverage detected