Documentation
¶
Overview ¶
Package grpc is the gRPC client-connection capability. A service that calls a remote gRPC API receives an IClientConnector in its constructor and asks it for connections; it never calls grpc.NewClient itself. Every connection the connector opens dials through the socket capability it was built on, which is what keeps the boundary crossing in candace/ipc and lets a test substitute an in-memory transport.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConnector ¶
type ClientConnector struct {
// contains filtered or unexported fields
}
ClientConnector opens gRPC clients through a socket capability.
func NewPlaintextClientConnector ¶
func NewPlaintextClientConnector(dialer ipcnet.IDialer, options ...upstream.DialOption) (*ClientConnector, error)
NewPlaintextClientConnector returns a connector for peers reached over an already-encrypted private network, such as a WireGuard tailnet, where the transport itself carries no TLS. That is the trust model of the network it is granted for, not a default for the public internet.
func (*ClientConnector) NewClient ¶
func (connector *ClientConnector) NewClient(target string) (*upstream.ClientConn, error)
NewClient opens a lazy client connection to target.
type IClientConnector ¶
type IClientConnector interface {
NewClient(target string) (*upstream.ClientConn, error)
}
IClientConnector opens gRPC client connections. The returned connection is lazy, as grpc.NewClient's is: it dials on the first RPC, and the caller closes it.