INNER CODE UNIT · Go

detectDataMountPoint

kimdre/doco-cd · cmd/doco-cd/main.go:113

func detectDataMountPoint(
	dataMountPath string,
	getContainerID func() (string, error),
	getMountPoint func(string, string) (container.MountPoint, error),
) (container.MountPoint, error) {
	appContainerID, err := getContainerID()
	if err != nil {
		return container.MountPoint{}, fmt.Errorf("failed to retrieve doco-cd container id: %w", err)
	}

	mountPoint, err := getMountPoint(appContainerID, dataMountPath)
	if err != nil {
		return container.MountPoint{}, fmt.Errorf("failed to retrieve %s mount point for container %s: %w", dataMountPath, appContainerID, err)
	}

	return mountPoint, nil
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…