Documentation

Overview

Package protocol defines the interface of CA client protocol. Currently we only support gRPC protocol sent to Istio CA server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CAProtocol

type CAProtocol interface {
	// SendCSR send CSR request to the CA server.
	SendCSR(*pb.CsrRequest) (*pb.CsrResponse, error)
}

CAProtocol is the interface for talking to CA.

type GrpcConnection

type GrpcConnection struct {
	// contains filtered or unexported fields

}

GrpcConnection implements CAProtocol talking to CA via gRPC. TODO(incfly): investigate the overhead of maintaining gRPC connection for CA server compared with establishing new connection every time.

func NewGrpcConnection

func NewGrpcConnection(caAddr string, dialOptions []grpc.DialOption) (*GrpcConnection, error)

NewGrpcConnection creates a gRPC connection.

func (*GrpcConnection) Close

func (c *GrpcConnection) Close() error

Close closes the gRPC connection.

func (*GrpcConnection) SendCSR

func (c *GrpcConnection) SendCSR(req *pb.CsrRequest) (*pb.CsrResponse, error)

SendCSR sends a resquest to CA server and returns the response.

Source Files

Directories

Path Synopsis
mock