kit: Index | Files | Directories

package transport

import ""

Package transport contains helpers applicable to all supported transports.


Package Files

doc.go error_handler.go

type ErrorHandler Uses

type ErrorHandler interface {
    Handle(ctx context.Context, err error)

ErrorHandler receives a transport error to be processed for diagnostic purposes. Usually this means logging the error.

type ErrorHandlerFunc Uses

type ErrorHandlerFunc func(ctx context.Context, err error)

The ErrorHandlerFunc type is an adapter to allow the use of ordinary function as ErrorHandler. If f is a function with the appropriate signature, ErrorHandlerFunc(f) is a ErrorHandler that calls f.

func (ErrorHandlerFunc) Handle Uses

func (f ErrorHandlerFunc) Handle(ctx context.Context, err error)

Handle calls f(ctx, err).

type LogErrorHandler Uses

type LogErrorHandler struct {
    // contains filtered or unexported fields

LogErrorHandler is a transport error handler implementation which logs an error.

func NewLogErrorHandler Uses

func NewLogErrorHandler(logger log.Logger) *LogErrorHandler

func (*LogErrorHandler) Handle Uses

func (h *LogErrorHandler) Handle(ctx context.Context, err error)


amqpPackage amqp implements an AMQP transport.
awslambdaPackage awslambda provides an AWS Lambda transport layer.
grpcPackage grpc provides a gRPC binding for endpoints.
httpPackage http provides a general purpose HTTP binding for endpoints.
http/jsonrpcPackage jsonrpc provides a JSON RPC (v2.0) binding for endpoints.
httprpPackage httprp provides an HTTP reverse-proxy transport.
natsPackage nats provides a NATS transport.

Package transport imports 2 packages (graph) and is imported by 33 packages. Updated 2020-11-03. Refresh now. Tools for package owners.