kit: github.com/go-kit/kit/transport Index | Files | Directories

package transport

import "github.com/go-kit/kit/transport"

Package transport contains helpers applicable to all supported transports.

Index

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)

Directories

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

Package transport imports 2 packages (graph) and is imported by 26 packages. Updated 2019-10-03. Refresh now. Tools for package owners.