grpc

package
v0.0.0-...-09de6dd Latest Latest
Warning

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

Go to latest
Published: May 26, 2016 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CodedError = grpc.Errorf

CodedError is a alias required to appease go vet

Functions

func ClientSetup

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

ClientSetup loads various TLS certificates and creates a gRPC TransportAuthenticator 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 NewServer

func NewServer(c *cmd.GRPCServerConfig) (*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.

Types

type BCode

type BCode codes.Code

BCode is an alias so we can use a stringer

const (
	// DNSQueryTimeout is used when DNS queries timeout
	DNSQueryTimeout BCode = 100

	// DNSError is used when DNS queries fail for some reason
	DNSError BCode = 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

func (BCode) GRPCCode

func (b BCode) GRPCCode() codes.Code

GRPCCode returns the gRPC version of the error code

func (BCode) String

func (i BCode) String() string

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

Jump to

Keyboard shortcuts

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