clients

package
v0.8.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromExtension added in v0.5.4

func FromExtension[T any](
	ctx context.Context,
	client managementv1.ManagementClient,
	serviceName string,
	constructor func(grpc.ClientConnInterface) T,
) (T, error)

func NewManagementClient added in v0.5.4

Types

type GatewayClient added in v0.5.4

type GatewayClient interface {
	grpc.ServiceRegistrar
	// credentials.PerRPCCredentials
	// Connect returns a ClientConnInterface connected to the streaming server.
	// The connection remains active until the provided context is canceled.
	Connect(context.Context) (grpc.ClientConnInterface, future.Future[error])
	RegisterSplicedStream(cc grpc.ClientConnInterface, name string)
	ClientConn() grpc.ClientConnInterface
}

func NewGatewayClient added in v0.5.4

func NewGatewayClient(
	ctx context.Context,
	address string,
	ip ident.Provider,
	kr keyring.Keyring,
	trustStrategy trust.Strategy,
) (GatewayClient, error)

type Locker added in v0.5.4

type Locker[T any] interface {
	// Use obtains exclusive ownership of the client, then calls the provided
	// function with the client. Ownership of the client is maintained until the
	// function returns.
	// It is safe to call Use if the Locker is nil; it will simply return false.
	Use(func(T)) bool
	// Close releases the client. After Close is called, Use() will return false.
	Close()
}

func NewLocker added in v0.5.4

func NewLocker[T any](cc grpc.ClientConnInterface, builder func(grpc.ClientConnInterface) T) Locker[T]

type ManagementClientOption added in v0.5.4

type ManagementClientOption func(*ManagementClientOptions)

func WithAddress added in v0.5.4

func WithAddress(addr string) ManagementClientOption

func WithDialOptions added in v0.5.4

func WithDialOptions(options ...grpc.DialOption) ManagementClientOption

type ManagementClientOptions added in v0.5.4

type ManagementClientOptions struct {
	// contains filtered or unexported fields
}

func (*ManagementClientOptions) Apply added in v0.5.4

Jump to

Keyboard shortcuts

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