client

package
v0.8.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

	EnvReadRemote  = "KETO_READ_REMOTE"
	EnvWriteRemote = "KETO_WRITE_REMOTE"

	ContextKeyTimeout contextKeys = "timeout"
)

Variables

This section is empty.

Functions

func Conn

func Conn(ctx context.Context, remote string) (*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"
)

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) *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