func WithRequireAuthentication(ctx context.Context) context.Context {
	return context.WithValue(ctx, requireAuthenticationKey{}, true)
}
WithRequireAuthentication prepares a context that when given to functions in
this file will fail when authentication is not available.
package arangod
import (
	"context"
	"crypto/tls"
	"net"
	nhttp "net/http"
	"strconv"
	"time"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	driver "github.com/arangodb/go-driver"
	"github.com/arangodb/go-driver/http"
	"github.com/arangodb/go-driver/jwt"
	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
	api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
	"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
)
type (
	skipAuthenticationKey struct{}
	requireAuthenticationKey struct{}
)
type TimeoutRunFunc k8sutil.TimeoutRunFunc
const (
	minArangoDDefaultTimeout = time.Second * 10
)
var requestTimeout = minArangoDDefaultTimeout
func GetRequestTimeout() time.Duration {
	return requestTimeout
}
func RunWithTimeout(ctx context.Context, run TimeoutRunFunc, timeout ...time.Duration) error {
	t := GetRequestTimeout()
	if len(timeout) > 0 {
		t = timeout[0]
	}
	return k8sutil.RunWithTimeout(ctx, k8sutil.TimeoutRunFunc(run), t)
}
func SetRequestTimeout(timeout time.Duration) {
	if timeout > minArangoDDefaultTimeout {
		requestTimeout = timeout
	}
}
func WithSkipAuthentication(ctx context.Context) context.Context {
	return context.WithValue(ctx, skipAuthenticationKey{}, true)
}