grpc

package
v0.0.0-...-58bac84 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package wrappers wraps the GRPC calls in the core interfaces.

Index

Constants

View Source
const (
	// DNSQueryTimeout is used when DNS queries timeout
	DNSQueryTimeout codes.Code = 100

	// DNSError is used when DNS queries fail for some reason
	DNSError codes.Code = 101
)

gRPC error codes used by Boulder. While the gRPC codes end at 16 we start at 100 to provide a little leeway in case they ever decide to add more

Variables

View Source
var CodedError = grpc.Errorf

CodedError is a alias required to appease go vet

View Source
var ErrMissingParameters = CodedError(codes.FailedPrecondition, "required RPC parameter was missing")

Functions

func ClientSetup

func ClientSetup(c *cmd.GRPCClientConfig, stats metrics.Scope) (*grpc.ClientConn, error)

ClientSetup loads various TLS certificates and creates a gRPC TransportCredentials that presents the client certificate and validates the certificate presented by the server is for a specific hostname and issued by the provided issuer certificate thens dials and returns a grpc.ClientConn to the remote service.

func CodeToProblem

func CodeToProblem(c codes.Code) probs.ProblemType

CodeToProblem takes a gRPC error code and translates it to a Boulder ProblemType

func ErrorToProb

func ErrorToProb(err error) *probs.ProblemDetails

ErrorToProb converts a error returned by a gRPC call to a probs.ProblemDetails

func NewServer

func NewServer(c *cmd.GRPCServerConfig, stats metrics.Scope) (*grpc.Server, net.Listener, error)

NewServer loads various TLS certificates and creates a gRPC Server that verifies the client certificate was issued by the provided issuer certificate and presents a a server TLS certificate.

func NewValidationAuthorityGRPCClient

func NewValidationAuthorityGRPCClient(cc *ggrpc.ClientConn) core.ValidationAuthority

func RegisterValidationAuthorityGRPCServer

func RegisterValidationAuthorityGRPCServer(s *ggrpc.Server, impl core.ValidationAuthority) error

Types

type CertificateAuthorityClientWrapper

type CertificateAuthorityClientWrapper struct {
	// contains filtered or unexported fields
}

CertificateAuthorityClientWrapper is the gRPC version of a core.CertificateAuthority client

func (CertificateAuthorityClientWrapper) GenerateOCSP

func (CertificateAuthorityClientWrapper) IssueCertificate

type CertificateAuthorityServerWrapper

type CertificateAuthorityServerWrapper struct {
	// contains filtered or unexported fields
}

CertificateAuthorityServerWrapper is the gRPC version of a core.CertificateAuthority server

func (*CertificateAuthorityServerWrapper) GenerateOCSP

func (*CertificateAuthorityServerWrapper) IssueCertificate

type PublisherClientWrapper

type PublisherClientWrapper struct {
	// contains filtered or unexported fields
}

PublisherClientWrapper is a wrapper needed to satisfy the interfaces in core/interfaces.go

func NewPublisherClientWrapper

func NewPublisherClientWrapper(inner pubPB.PublisherClient, timeout time.Duration) *PublisherClientWrapper

NewPublisherClientWrapper returns an initialized PublisherClientWrapper

func (*PublisherClientWrapper) SubmitToCT

func (pc *PublisherClientWrapper) SubmitToCT(ctx context.Context, der []byte) error

SubmitToCT makes a call to the gRPC version of the publisher

type PublisherServerWrapper

type PublisherServerWrapper struct {
	// contains filtered or unexported fields
}

PublisherServerWrapper is a wrapper required to bridge the differences between the gRPC and previous AMQP interfaces

func NewPublisherServerWrapper

func NewPublisherServerWrapper(inner *publisher.Impl) *PublisherServerWrapper

NewPublisherServerWrapper returns an initialized PublisherServerWrapper

func (*PublisherServerWrapper) SubmitToCT

func (pub *PublisherServerWrapper) SubmitToCT(ctx context.Context, request *pubPB.Request) (*pubPB.Empty, error)

SubmitToCT calls the same method on the wrapped publisher.Impl since their interfaces are different

type ValidationAuthorityGRPCClient

type ValidationAuthorityGRPCClient struct {
	// contains filtered or unexported fields
}

func (ValidationAuthorityGRPCClient) IsSafeDomain

IsSafeDomain returns true if the domain given is determined to be safe by an third-party safe browsing API.

func (ValidationAuthorityGRPCClient) PerformValidation

func (vac ValidationAuthorityGRPCClient) PerformValidation(ctx context.Context, domain string, challenge core.Challenge, authz core.Authorization) ([]core.ValidationRecord, error)

PerformValidation has the VA revalidate the specified challenge and returns the updated Challenge object.

type ValidationAuthorityGRPCServer

type ValidationAuthorityGRPCServer struct {
	// contains filtered or unexported fields
}

func (*ValidationAuthorityGRPCServer) IsSafeDomain

func (*ValidationAuthorityGRPCServer) PerformValidation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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