protocol

package
v0.0.0-...-4638b96 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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