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