Documentation
¶
Index ¶
- func CreateStatus(code codes.Code, msg string) *types.Status
- func CreateStatusf(code codes.Code, format string, a ...any) *types.Status
- func MakeErr(log logrus.FieldLogger, code codes.Code, msg string, err error) error
- func MakeStatus(log logrus.FieldLogger, code codes.Code, msg string, err error) *types.Status
- func OK() *types.Status
- type CallCounter
- type Names
- type RateLimiter
- type RateLimiterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStatus ¶ added in v1.15.2
CreateStatus creates a proto Status
func CreateStatusf ¶ added in v1.15.2
CreateStatus creates a proto Status
func MakeErr ¶ added in v1.15.2
MakeErr logs and returns an error composed of: msg, err and code. Errors are treated differently according to its gRPC code.
func MakeStatus ¶ added in v1.15.2
MakeStatus logs and returns a status composed of: msg, err and code. Errors are treated differently according to its gRPC code.
Types ¶
type CallCounter ¶
type CallCounter interface {
AddLabel(name, value string)
}
type Names ¶
type Names struct {
// RawService is the unmodified service name
RawService string
// Service is the shortened service name (e.g. "svid.v1.SVID", "WorkloadAPI")
Service string
// Method is the method name (e.g. MintX509SVID)
Method string
// MetricKey is the metric key for the method
MetricKey []string
}
type RateLimiter ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.