MCPcopy Index your code
hub / github.com/cockroachdb/errors / init

Function init

extgrpc/ext_grpc.go:177–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175}
176
177func init() {
178 grpcError := grpcstatus.Error(codes.Unknown, "")
179 errbase.RegisterLeafEncoder(errbase.GetTypeKey(grpcError), encodeGrpcStatus)
180 errbase.RegisterLeafDecoder(errbase.GetTypeKey(grpcError), decodeGrpcStatus)
181
182 gogoError := gogostatus.Error(codes.Unknown, "")
183 errbase.RegisterLeafEncoder(errbase.GetTypeKey(gogoError), encodeGoGoStatus)
184 errbase.RegisterLeafDecoder(errbase.GetTypeKey(gogoError), decodeGoGoStatus)
185
186 errbase.RegisterWrapperEncoder(errbase.GetTypeKey((*withGrpcCode)(nil)), encodeWithGrpcCode)
187 errbase.RegisterWrapperDecoder(errbase.GetTypeKey((*withGrpcCode)(nil)), decodeWithGrpcCode)
188}

Callers

nothing calls this directly

Calls 6

RegisterLeafEncoderFunction · 0.92
GetTypeKeyFunction · 0.92
RegisterLeafDecoderFunction · 0.92
RegisterWrapperEncoderFunction · 0.92
RegisterWrapperDecoderFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…