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

Function NewManager

internal/idle/idle.go:74–81  ·  view source on GitHub ↗

NewManager creates a new idleness manager implementation for the given idle timeout. It begins in idle mode.

(cc ClientConn, timeout time.Duration)

Source from the content-addressed store, hash-verified

72// NewManager creates a new idleness manager implementation for the
73// given idle timeout. It begins in idle mode.
74func NewManager(cc ClientConn, timeout time.Duration) *Manager {
75 return &Manager{
76 cc: cc,
77 timeout: timeout,
78 actuallyIdle: true,
79 activeCallsCount: -math.MaxInt32,
80 }
81}
82
83// resetIdleTimerLocked resets the idle timer to the given duration. Called
84// when exiting idle mode or when the timer fires and we need to reset it.

Calls

no outgoing calls