adapters

package
v0.0.0-...-760d8ea Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPC

type GRPC interface {
	// Report logs the result of an RPC call to a specified service.
	//
	// Since gRPC is not aware of middlewares, you can use the WrapGRPCCall function over your services, to
	// automatically log the result of each call.
	Report(service string, err error)
}

func NewGRPC

func NewGRPC(formatter formatters.Formatter) GRPC

type GRPCCallback

type GRPCCallback[In any, Out any] func(ctx context.Context, in In) (Out, error)

func WrapGRPCCall

func WrapGRPCCall[In any, Out any](service string, logger GRPC, callback GRPCCallback[In, Out]) GRPCCallback[In, Out]

WrapGRPCCall wraps a GRPCCallback callback with a GRPC logger. It also adds extra reporting that are not available to the base class, such as latency info.

type Gin

type Gin interface {
	Middleware() gin.HandlerFunc
}

func NewGin

func NewGin(formatter formatters.Formatter, projectID string) Gin

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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