Documentation ¶
Index ¶
- Variables
- func LogIDClientInterceptor() grpc.UnaryClientInterceptor
- func LogIDClientStreamInterceptor() grpc.StreamClientInterceptor
- func LogIDServerInterceptor() grpc.UnaryServerInterceptor
- func LogIDServerStreamInterceptor() grpc.StreamServerInterceptor
- func StreamClientInterceptor() grpc.DialOption
- func StreamServerInterceptor() grpc.ServerOption
- func UnaryClientInterceptor() grpc.DialOption
- func UnaryServerInterceptor() grpc.ServerOption
- type AddressRewriter
- type ConnDialer
- type ConnectionStater
- type Dialer
- type PassThroughCredentials
- func (c PassThroughCredentials) ClientHandshake(ctx context.Context, authority string, conn net.Conn) (net.Conn, credentials.AuthInfo, error)
- func (c PassThroughCredentials) Clone() credentials.TransportCredentials
- func (c PassThroughCredentials) Info() credentials.ProtocolInfo
- func (c PassThroughCredentials) OverrideServerName(string) error
- func (c PassThroughCredentials) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error)
- type QUICDialer
- type SimpleDialer
- type TCPDialer
Constants ¶
This section is empty.
Variables ¶
var RetryOption grpc.CallOption = grpc_retry.WithPerRetryTimeout(3 * time.Second)
var RetryProfile = []grpc.CallOption{ RetryOption, }
RetryProfile is the common retry profile for RPCs.
Functions ¶
func LogIDClientInterceptor ¶
func LogIDClientInterceptor() grpc.UnaryClientInterceptor
func LogIDClientStreamInterceptor ¶
func LogIDClientStreamInterceptor() grpc.StreamClientInterceptor
func LogIDServerInterceptor ¶
func LogIDServerInterceptor() grpc.UnaryServerInterceptor
func LogIDServerStreamInterceptor ¶
func LogIDServerStreamInterceptor() grpc.StreamServerInterceptor
func StreamClientInterceptor ¶
func StreamClientInterceptor() grpc.DialOption
StreamClientInterceptor constructs the default stream RPC client-side interceptor for SCION control-plane applications.
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.ServerOption
StreamServerInterceptor constructs the default stream RPC server-side interceptor for SCION control-plane applications.
func UnaryClientInterceptor ¶
func UnaryClientInterceptor() grpc.DialOption
UnaryClientInterceptor constructs the default unary RPC client-side interceptor for SCION control-plane applications.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.ServerOption
UnaryServerInterceptor constructs the default unary RPC server-side interceptor for SCION control-plane applications.
Types ¶
type AddressRewriter ¶
type AddressRewriter interface {
RedirectToQUIC(ctx context.Context, address net.Addr) (net.Addr, bool, error)
}
AddressRewriter redirects to QUIC endpoints.
type ConnDialer ¶
ConnDialer dials a net.Conn.
type ConnectionStater ¶ added in v0.9.0
type ConnectionStater interface {
ConnectionState() tls.ConnectionState
}
type Dialer ¶
type Dialer interface { // DialContext creates a client connection to the given target. Dial(context.Context, net.Addr) (*grpc.ClientConn, error) }
Dialer creates a gRPC client connection to the given target.
type PassThroughCredentials ¶ added in v0.9.0
type PassThroughCredentials struct{}
PassThroughCredentials implements the grpc/credentials.TransportCredentials interface. It allows to pass the TLS connection state of an underlying TLS connection, e.g. from an underlying QUIC session, into the grpc stack. This allows accessing this information in the context of grpc/peer.Peer.AuthInfo. The handshake methods only extract the TLS state and otherwise simply pass-through the underlying connection object. The underlying connection must implement the ConnectionStater interface.
func (PassThroughCredentials) ClientHandshake ¶ added in v0.9.0
func (PassThroughCredentials) Clone ¶ added in v0.9.0
func (c PassThroughCredentials) Clone() credentials.TransportCredentials
func (PassThroughCredentials) Info ¶ added in v0.9.0
func (c PassThroughCredentials) Info() credentials.ProtocolInfo
func (PassThroughCredentials) OverrideServerName ¶ added in v0.9.0
func (c PassThroughCredentials) OverrideServerName(string) error
func (PassThroughCredentials) ServerHandshake ¶ added in v0.9.0
func (c PassThroughCredentials) ServerHandshake( conn net.Conn, ) (net.Conn, credentials.AuthInfo, error)
type QUICDialer ¶
type QUICDialer struct { Rewriter AddressRewriter Dialer ConnDialer }
QUICDialer dials a gRPC connection over QUIC/SCION. This dialer is meant to be used for inter AS communication, and is capable of resolving svc addresses.
func (*QUICDialer) Dial ¶
func (d *QUICDialer) Dial(ctx context.Context, addr net.Addr) (*grpc.ClientConn, error)
Dial dials a gRPC connection over QUIC/SCION.
type SimpleDialer ¶
type SimpleDialer struct{}
SimpleDialer implements a wrapper around grpc.DialContext that implements the dialer interface. It simply uses the string of the address to dial.
func (SimpleDialer) Dial ¶
func (SimpleDialer) Dial(ctx context.Context, address net.Addr) (*grpc.ClientConn, error)
Dial dials the address by converting it to a string.