Documentation
¶
Overview ¶
Package devwatch implements the development loop of a project: the develop.watch triggers that sync, restart or rebuild services as the files they come from change. It sits on top of pkg/watch, which only reports the file system events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
engine.Backend
// CLI is the Docker CLI Compose runs in: it owns the output stream the
// sync commands write to, the config the exec hooks read, and runs them.
CLI() command.Cli
// Build builds the images of the project's services.
Build(ctx context.Context, project *types.Project, options api.BuildOptions) (map[string]string, error)
// CreateAndStart converges the project's services to their configuration
// and starts them.
CreateAndStart(ctx context.Context, project *types.Project, options api.CreateOptions) error
// Restart restarts the services of a project.
Restart(ctx context.Context, projectName string, options api.RestartOptions) error
// RemoveDanglingImages removes the dangling images of a project, but the ones keep reports.
RemoveDanglingImages(ctx context.Context, projectName string, keep func(image.Summary) bool) error
}
Backend is what the development loop needs from the engine it drives.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs the development loop on a Backend.
type WatchFunc ¶
type WatchFunc func(ctx context.Context, project *types.Project, options api.WatchOptions) (func() error, error)
WatchFunc starts a watch and returns the function that waits for its end.
Click to show internal directories.
Click to hide internal directories.