MCPcopy Create free account
hub / github.com/PostHog/duckgres / NewRuntimeOrgConnectionLimiter

Function NewRuntimeOrgConnectionLimiter

controlplane/connection_limiter.go:53–66  ·  view source on GitHub ↗
(store runtimeOrgConnectionStore, orgID, cpInstanceID string, queueTTL time.Duration)

Source from the content-addressed store, hash-verified

51// scheduler handshake. Concrete stores that implement it own both global
52// admission evaluation and claiming the caller's request. Compatibility stores
53// may fall back to the exact-ref TryAcquire interfaces above; ID-only acquisition
54// is deliberately unsupported because it cannot fence a reused request ID.
55type runtimeOrgConnectionScheduleAndClaimStore interface {
56 ScheduleAndClaimOrgConnectionLeaseForRef(ref configstore.OrgConnectionAdmissionRef) (*configstore.OrgConnectionLease, error)
57}
58
59type runtimeOrgConnectionScheduleAndClaimContextStore interface {
60 ScheduleAndClaimOrgConnectionLeaseForRefContext(ctx context.Context, ref configstore.OrgConnectionAdmissionRef) (*configstore.OrgConnectionLease, error)
61}
62
63type runtimeOrgConnectionScheduleAndClaimEvaluationContextStore interface {
64 ScheduleAndClaimOrgConnectionLeaseForRefWithEvaluationContext(ctx context.Context, ref configstore.OrgConnectionAdmissionRef) (*configstore.OrgConnectionLease, configstore.OrgConnectionAdmissionEvaluation, error)
65}
66
67type runtimeOrgConnectionLimiter struct {
68 store runtimeOrgConnectionStore
69 reclaimer admissionReclaimer

Callers 1

createOrgStackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected