Exemplo n.º 1
0
func (r *router) executorHead(
	ctx types.Context,
	w http.ResponseWriter,
	req *http.Request,
	store types.Store) error {

	ei, err := executors.ExecutorInfoInspect(store.GetString("executor"), false)
	if err != nil {
		return err
	}

	return writeFile(w, ei)
}
Exemplo n.º 2
0
	"github.com/akutz/goof"
	"github.com/akutz/gotil"
	"github.com/stretchr/testify/assert"
	yaml "gopkg.in/yaml.v2"

	apiserver "github.com/codedellemc/libstorage/api/server"
	"github.com/codedellemc/libstorage/api/server/executors"
	"github.com/codedellemc/libstorage/api/types"
	"github.com/codedellemc/libstorage/api/utils"
	"github.com/codedellemc/libstorage/client"
)

var (
	lsxbin string

	lsxLinuxInfo, _  = executors.ExecutorInfoInspect("lsx-linux", false)
	lsxDarwinInfo, _ = executors.ExecutorInfoInspect("lsx-darwin", false)
	// lsxWindowsInfo, _ = executors.ExecutorInfoInspect("lsx-windows.exe", false)

	tcpTest        bool
	tcpTLSTest, _  = strconv.ParseBool(os.Getenv("LIBSTORAGE_TEST_TCP_TLS"))
	sockTest, _    = strconv.ParseBool(os.Getenv("LIBSTORAGE_TEST_SOCK"))
	sockTLSTest, _ = strconv.ParseBool(os.Getenv("LIBSTORAGE_TEST_SOCK_TLS"))

	printConfigOnFail, _ = strconv.ParseBool(os.Getenv(
		"LIBSTORAGE_TEST_PRINT_CONFIG_ON_FAIL"))
)

func init() {
	goof.IncludeFieldsInFormat = true
	if runtime.GOOS == "windows" {