NewManager creates a new sample instance manager.
(store *store.Store, profile *config.Profile)
| 33 | |
| 34 | // NewManager creates a new sample instance manager. |
| 35 | func NewManager(store *store.Store, profile *config.Profile) *Manager { |
| 36 | // Using profile.Port + 3 as our sample database port. |
| 37 | // The actual startup of sample instances will be determined by checking the instance table. |
| 38 | port := profile.Port + 3 |
| 39 | |
| 40 | return &Manager{ |
| 41 | store: store, |
| 42 | profile: profile, |
| 43 | port: port, |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // StartIfExist starts sample instances if they exist in the database. |
| 48 | func (m *Manager) StartIfExist(ctx context.Context, workspaceID string) error { |