Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ClientSide identifies the client in this communication. ClientSide int = iota // ServerSide identifies the server in this communication. ServerSide )
Variables ¶
View Source
var PeerNotRespondingError = &peerNotRespondingError{}
PeerNotRespondingError is returned when a peer server is not responding after a channel has been established. It is treated as a temporary connection error and re-connection to the server should be attempted.
Functions ¶
This section is empty.
Types ¶
type ALTSRecordCrypto ¶
type ALTSRecordCrypto interface { // Encrypt encrypts the plaintext and computes the tag (if any) of dst // and plaintext. dst and plaintext may fully overlap or not at all. Encrypt(dst, plaintext []byte) ([]byte, error) // EncryptionOverhead returns the tag size (if any) in bytes. EncryptionOverhead() int // Decrypt decrypts ciphertext and verify the tag (if any). dst and // ciphertext may alias exactly or not at all. To reuse ciphertext's // storage for the decrypted output, use ciphertext[:0] as dst. Decrypt(dst, ciphertext []byte) ([]byte, error) }
ALTSRecordCrypto is the interface for gRPC ALTS record protocol.
type ALTSRecordFunc ¶
type ALTSRecordFunc func(side int, keyData []byte) (ALTSRecordCrypto, error)
ALTSRecordFunc is a function type for factory functions that create ALTSRecordCrypto instances.
type Handshaker ¶
type Handshaker interface { // ClientHandshake starts and completes a client-side handshaking and // returns a secure connection and corresponding auth information. ClientHandshake(ctx context.Context) (net.Conn, credentials.AuthInfo, error) // ServerHandshake starts and completes a server-side handshaking and // returns a secure connection and corresponding auth information. ServerHandshake(ctx context.Context) (net.Conn, credentials.AuthInfo, error) // Close terminates the Handshaker. It should be called when the caller // obtains the secure connection. Close() }
Handshaker defines a ALTS handshaker interface.
Directories ¶
Path | Synopsis |
---|---|
Package conn contains an implementation of a secure channel created by gRPC handshakers.
|
Package conn contains an implementation of a secure channel created by gRPC handshakers. |
Package service manages connections between the VM application and the ALTS handshaker service.
|
Package service manages connections between the VM application and the ALTS handshaker service. |
Click to show internal directories.
Click to hide internal directories.