Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - func CheckQuota(ctx context.Context, tlr *hubv1.GetTokenLeaseRequest) (int, string, error)
 - func NewTokenLeaseRequest(ctx context.Context, gn string, fn *string, pb *int32, dw *float32) (context.Context, *hubv1.GetTokenLeaseRequest)
 - func ValidateTokens(ctx context.Context, guard string, tokens []string) (int, error)
 
Constants ¶
      View Source
      
  
const ( MAX_QUOTA_WAIT = 1 * time.Second CACHED_LEASE_CHECK_INTERVAL = 200 * time.Millisecond // TODO: what should this be set to? BATCH_TOKEN_CONSUME_INTERVAL = 200 * time.Millisecond // TODO: what should this be set to? // CheckQuota Response Codes CheckQuotaUnknown = iota CheckQuotaAllowed CheckQuotaBlocked CheckQuotaSkipped // special case of Allowed CheckQuotaFailOpen // special case of Allowed // ValidateTokens Response Codes ValidateTokensUnknown = iota ValidateTokensValid ValidateTokensInvalid ValidateTokensSkipped // special case of Valid ValidateTokensFailOpen // special case of Valid )
Variables ¶
This section is empty.
Functions ¶
func CheckQuota ¶
func NewTokenLeaseRequest ¶
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.