Esempio n. 1
0
func start(dt drivers.DriverType, driver dkvolume.Driver) {
	h := dkvolume.NewHandler(driver)
	if isTCPEnabled() {
		addr := os.Getenv(EnvTCPAddr)
		if addr == "" {
			addr, _ = rootCmd.PersistentFlags().GetString(PortFlag)
		}
		fmt.Println(h.ServeTCP(dt.String(), addr))
	} else {
		fmt.Println(h.ServeUnix("", dt.String()))
	}
}
Esempio n. 2
0
func rootForType(dt drivers.DriverType) string {
	return filepath.Join(baseDir, dt.String())
}