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

Function KeepaliveEnforcementPolicy

server.go:349–353  ·  view source on GitHub ↗

KeepaliveEnforcementPolicy returns a ServerOption that sets keepalive enforcement policy for the server.

(kep keepalive.EnforcementPolicy)

Source from the content-addressed store, hash-verified

347
348// KeepaliveEnforcementPolicy returns a ServerOption that sets keepalive enforcement policy for the server.
349func KeepaliveEnforcementPolicy(kep keepalive.EnforcementPolicy) ServerOption {
350 return newFuncServerOption(func(o *serverOptions) {
351 o.keepalivePolicy = kep
352 })
353}
354
355// CustomCodec returns a ServerOption that sets a codec for message marshaling and unmarshaling.
356//

Calls 1

newFuncServerOptionFunction · 0.85