mirror of
https://github.com/sablierapp/sablier.git
synced 2026-01-01 18:47:23 +01:00
* refactor: rename providers to Provider * refactor folders * fix build cmd * fix build cmd * fix build cmd * fix cmd start
17 lines
403 B
Go
17 lines
403 B
Go
package docker
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"github.com/docker/docker/api/types/container"
|
|
)
|
|
|
|
func (p *Provider) InstanceStart(ctx context.Context, name string) error {
|
|
// TODO: InstanceStart should block until the container is ready.
|
|
err := p.Client.ContainerStart(ctx, name, container.StartOptions{})
|
|
if err != nil {
|
|
return fmt.Errorf("cannot start container %s: %w", name, err)
|
|
}
|
|
return nil
|
|
}
|