package sync
import "github.com/docker/compose/v2/internal/sync"
Index ¶
- type ArchiveBuilder
- func NewArchiveBuilder(writer io.Writer) *ArchiveBuilder
- func (a *ArchiveBuilder) ArchivePathsIfExist(paths []PathMapping) error
- func (a *ArchiveBuilder) Close() error
- type LowLevelClient
- type PathMapping
- type Syncer
- type Tar
Types ¶
type ArchiveBuilder ¶
type ArchiveBuilder struct {
// contains filtered or unexported fields
}
func NewArchiveBuilder ¶
func NewArchiveBuilder(writer io.Writer) *ArchiveBuilder
func (*ArchiveBuilder) ArchivePathsIfExist ¶
func (a *ArchiveBuilder) ArchivePathsIfExist(paths []PathMapping) error
ArchivePathsIfExist creates a tar archive of all local files in `paths`. It quietly skips any paths that don't exist.
func (*ArchiveBuilder) Close ¶
func (a *ArchiveBuilder) Close() error
type LowLevelClient ¶
type LowLevelClient interface { ContainersForService(ctx context.Context, projectName string, serviceName string) ([]container.Summary, error) Exec(ctx context.Context, containerID string, cmd []string, in io.Reader) error Untar(ctx context.Context, id string, reader io.ReadCloser) error }
type PathMapping ¶
type PathMapping struct { // HostPath that was created/modified/deleted outside the container. // // This is the path as seen from the user's perspective, e.g. // - C:\Users\moby\Documents\hello-world\main.go (file on Windows) // - /Users/moby/Documents/hello-world (directory on macOS) HostPath string // ContainerPath for the target file inside the container (only populated // for sync events, not rebuild). // // This is the path as used in Docker CLI commands, e.g. // - /workdir/main.go // - /workdir/subdir ContainerPath string }
PathMapping contains the Compose service and modified host system path.
type Syncer ¶
type Syncer interface { Sync(ctx context.Context, service string, paths []*PathMapping) error }
type Tar ¶
type Tar struct {
// contains filtered or unexported fields
}
func NewTar ¶
func NewTar(projectName string, client LowLevelClient) *Tar
func (*Tar) Sync ¶
Source Files ¶
- Version
- v2.35.1 (latest)
- Published
- Apr 17, 2025
- Platform
- js/wasm
- Imports
- 14 packages
- Last checked
- 2 hours ago –
Tools for package owners.