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

Method setBlacklist

internal/binarylog/binarylog.go:153–165  ·  view source on GitHub ↗

Set blacklist method for "-service/method".

(method string)

Source from the content-addressed store, hash-verified

151
152// Set blacklist method for "-service/method".
153func (l *logger) setBlacklist(method string) error {
154 if _, ok := l.config.Blacklist[method]; ok {
155 return fmt.Errorf("conflicting blacklist rules for method %v found", method)
156 }
157 if _, ok := l.config.Methods[method]; ok {
158 return fmt.Errorf("conflicting method rules for method %v found", method)
159 }
160 if l.config.Blacklist == nil {
161 l.config.Blacklist = make(map[string]struct{})
162 }
163 l.config.Blacklist[method] = struct{}{}
164 return nil
165}
166
167// getMethodLogger returns the MethodLogger for the given methodName.
168//

Callers 1

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected