func (c *client) Prepare(ctx context.Context, localPath string) error {
	input := provisioner.Request{
		LocalPath: localPath,
	}
	req, err := c.newRequest("POST", "/prepare", input)
	if err != nil {
		return errors.WithStack(err)
	}
	if err := c.do(ctx, req, nil); err != nil {
		return errors.WithStack(err)
	}
	return nil
}
Prepare a volume at the given local path
package client
import (
	"bytes"
	"context"
	"crypto/tls"
	"encoding/json"
	"io"
	"io/ioutil"
	"net"
	"net/http"
	"net/url"
	"time"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	"github.com/arangodb/kube-arangodb/pkg/storage/provisioner"
)
func New(endpoint string) (provisioner.API, error) {
	u, err := url.Parse(endpoint)
	if err != nil {
		return nil, errors.WithStack(err)
	}
	u.Path = ""
	return &client{
		endpoint: *u,
	}, nil
}
type client struct {
	endpoint url.URL
}
const (
	defaultHTTPTimeout = time.Minute * 2
)
var (
	httpClient = &http.Client{
		Timeout: defaultHTTPTimeout,
		Transport: &http.Transport{
			Proxy: http.ProxyFromEnvironment,
			DialContext: (&net.Dialer{
				Timeout:   30 * time.Second,
				KeepAlive: 30 * time.Second,
				DualStack: true,
			}).DialContext,
			MaxIdleConns:        100,
			MaxIdleConnsPerHost: 10,
			IdleConnTimeout:     90 * time.Second,
			TLSHandshakeTimeout: 90 * time.Second,
			TLSClientConfig: &tls.Config{
				InsecureSkipVerify: true,
			},
			ExpectContinueTimeout: 1 * time.Second,
		},
	}
)
func (c *client) GetNodeInfo(ctx context.Context) (provisioner.NodeInfo, error) {
	req, err := c.newRequest("GET", "/nodeinfo", nil)
	if err != nil {
		return provisioner.NodeInfo{}, errors.WithStack(err)
	}
	var result provisioner.NodeInfo
	if err := c.do(ctx, req, &result); err != nil {
		return provisioner.NodeInfo{}, errors.WithStack(err)
	}
	return result, nil
}
func (c *client) GetInfo(ctx context.Context, localPath string) (provisioner.Info, error) {
	input := provisioner.Request{
		LocalPath: localPath,
	}
	req, err := c.newRequest("POST", "/info", input)
	if err != nil {
		return provisioner.Info{}, errors.WithStack(err)
	}
	var result provisioner.Info
	if err := c.do(ctx, req, &result); err != nil {
		return provisioner.Info{}, errors.WithStack(err)
	}
	return result, nil
}