MCPcopy Create free account
hub / github.com/cloudbase/garm / ExiresAt

Method ExiresAt

params/github.go:370–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

368}
369
370func (a RunnerScaleSetSession) ExiresAt() (time.Time, error) {
371 jwt, err := a.getJWT()
372 if err != nil {
373 return time.Time{}, fmt.Errorf("failed to decode jwt token: %w", err)
374 }
375 expiration, err := jwt.Claims.GetExpirationTime()
376 if err != nil {
377 return time.Time{}, fmt.Errorf("failed to get expiration time: %w", err)
378 }
379
380 return expiration.Time, nil
381}
382
383func (a RunnerScaleSetSession) IsExpired() bool {
384 if exp, err := a.ExiresAt(); err == nil {

Callers 3

IsExpiredMethod · 0.95
TimeRemainingMethod · 0.95
maybeRefreshTokenMethod · 0.45

Calls 1

getJWTMethod · 0.95

Tested by

no test coverage detected