client

package
v0.11.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 22 Imported by: 9

Documentation

Index

Constants

View Source
const (
	FlagReadRemote  = "read-remote"
	FlagWriteRemote = "write-remote"
	FlagOplRemote   = "syntax-remote"

	FlagInsecureNoTransportSecurity  = "insecure-disable-transport-security"
	FlagInsecureSkipHostVerification = "insecure-skip-hostname-verification"
	FlagAuthority                    = "authority"

	EnvReadRemote  = "KETO_READ_REMOTE"
	EnvWriteRemote = "KETO_WRITE_REMOTE"
	EnvAuthToken   = "KETO_BEARER_TOKEN" // nosec G101 -- just the key, not the value
	EnvAuthority   = "KETO_AUTHORITY"

	ContextKeyTimeout contextKeys = "timeout"
)

Variables

This section is empty.

Functions

func Conn

func Conn(ctx context.Context, remote string, details connectionDetails) (*grpc.ClientConn, error)

func GetReadConn

func GetReadConn(cmd *cobra.Command) (*grpc.ClientConn, error)

func GetWriteConn

func GetWriteConn(cmd *cobra.Command) (*grpc.ClientConn, error)

func RegisterRemoteURLFlags

func RegisterRemoteURLFlags(flags *pflag.FlagSet)

Types

type ServerType

type ServerType string
const (
	WriteServer ServerType = "write"
	ReadServer  ServerType = "read"
	OplServer   ServerType = "opl"
)

type TestServer

type TestServer struct {
	Reg              driver.Registry
	Namespace        *namespace.Namespace
	Addr, FlagRemote string
	Cmd              *cmdx.CommandExecuter
	Server           *grpc.Server
	NewServer        func(ctx context.Context) *grpc.Server
	// contains filtered or unexported fields
}

func NewTestServer

func NewTestServer(t *testing.T,
	rw ServerType, nspaces []*namespace.Namespace, newCmd func() *cobra.Command,
	registryOpts ...driver.TestRegistryOption,
) *TestServer

func (*TestServer) Shutdown

func (ts *TestServer) Shutdown(t *testing.T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL