Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
17
plugins/inputs/sqlserver/azuretoken.go
Normal file
17
plugins/inputs/sqlserver/azuretoken.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package sqlserver
|
||||
|
||||
import "time"
|
||||
|
||||
// New token structure for Azure Identity SDK
|
||||
type azureToken struct {
|
||||
token string
|
||||
expiresOn time.Time
|
||||
}
|
||||
|
||||
// IsExpired helper method for Azure token expiry
|
||||
func (t *azureToken) IsExpired() bool {
|
||||
if t == nil {
|
||||
return true
|
||||
}
|
||||
return time.Now().After(t.expiresOn)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue