MCPcopy
hub / github.com/grpc/grpc-go / RegisterLoggerBuilder

Function RegisterLoggerBuilder

authz/audit/audit_logger.go:46–50  ·  view source on GitHub ↗

RegisterLoggerBuilder registers the builder in a global map using b.Name() as the key. This should only be called during initialization time (i.e. in an init() function). If multiple builders are registered with the same name, the one registered last will take effect.

(b LoggerBuilder)

Source from the content-addressed store, hash-verified

44// function). If multiple builders are registered with the same name,
45// the one registered last will take effect.
46func RegisterLoggerBuilder(b LoggerBuilder) {
47 registry.mu.Lock()
48 defer registry.mu.Unlock()
49 registry.builders[b.Name()] = b
50}
51
52// GetLoggerBuilder returns a builder with the given name.
53// It returns nil if the builder is not found in the registry.

Callers 6

TestAuditLoggerMethod · 0.92
initFunction · 0.92
TestRBACHTTPFilterMethod · 0.92
TestNewChainEngineMethod · 0.92
TestChainEngineMethod · 0.92
TestBuildLoggerErrorsMethod · 0.92

Calls 3

NameMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 5

TestAuditLoggerMethod · 0.74
TestRBACHTTPFilterMethod · 0.74
TestNewChainEngineMethod · 0.74
TestChainEngineMethod · 0.74
TestBuildLoggerErrorsMethod · 0.74