func New(address string, opts ...Opt) (Client, error) {
	grpcConn, _, err := mkConn(address, opts...)
	if err != nil {
		return nil, err
	}
	return &grpcClient{stub: svcv1.NewCerbosServiceClient(grpcConn)}, nil
}
New creates a new Cerbos client.
package client
import (
	"context"
	"crypto/tls"
	"crypto/x509"
	"errors"
	"fmt"
	"os"
	"time"
	"github.com/google/uuid"
	grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials"
	"google.golang.org/grpc/credentials/local"
	effectv1 "github.com/cerbos/cerbos/api/genpb/cerbos/effect/v1"
	requestv1 "github.com/cerbos/cerbos/api/genpb/cerbos/request/v1"
	svcv1 "github.com/cerbos/cerbos/api/genpb/cerbos/svc/v1"
	"github.com/cerbos/cerbos/internal/util"
)
type Client interface {
	IsAllowed(context.Context, *Principal, *Resource, string) (bool, error)
	CheckResourceSet(context.Context, *Principal, *ResourceSet, ...string) (*CheckResourceSetResponse, error)
	CheckResourceBatch(context.Context, *Principal, *ResourceBatch) (*CheckResourceBatchResponse, error)
	ServerInfo(context.Context) (*ServerInfo, error)
	With(opts ...RequestOpt) Client
}
type config struct {
	address            string
	plaintext          bool
	tlsAuthority       string
	tlsInsecure        bool
	tlsCACert          string
	tlsClientCert      string
	tlsClientKey       string
	connectTimeout     time.Duration
	maxRetries         uint
	retryTimeout       time.Duration
	userAgent          string
	playgroundInstance string
}
type Opt func(*config)
func WithPlaintext() Opt {
	return func(c *config) {
		c.plaintext = true
	}
}
func WithTLSAuthority(authority string) Opt {
	return func(c *config) {
		c.tlsAuthority = authority
	}
}
func WithTLSInsecure() Opt {
	return func(c *config) {
		c.tlsInsecure = true
	}
}
func WithTLSCACert(certPath string) Opt {
	return func(c *config) {
		c.tlsCACert = certPath
	}
}
func WithTLSClientCert(cert, key string) Opt {
	return func(c *config) {
		c.tlsClientCert = cert
		c.tlsClientKey = key
	}
}
func WithConnectTimeout(timeout time.Duration) Opt {
	return func(c *config) {
		c.connectTimeout = timeout
	}
}
func WithMaxRetries(retries uint) Opt {
	return func(c *config) {
		c.maxRetries = retries
	}
}
func WithRetryTimeout(timeout time.Duration) Opt {
	return func(c *config) {
		c.retryTimeout = timeout
	}
}
func WithUserAgent(ua string) Opt {
	return func(c *config) {
		c.userAgent = ua
	}
}
func WithPlaygroundInstance(instance string) Opt {
	return func(c *config) {
		c.playgroundInstance = instance
	}
}