Package: tokenmanager

import "../ibm-cos-sdk-go/aws/credentials/ibmiam/tokenmanager"

Variables

var NewIBMClient = writable

NewIBMClient client constructor

Value:

newIBMClient
var DefaultIBMClient = writable

DefaultIBMClient client constructor with default values

Value:

defaultIBMClient
var DefaultAdvisoryTimeoutFunc = writable

DefaultAdvisoryTimeoutFunc set the advisory timeout to 25% of remaining time - usually 15 minutes on 1 hour expiry

Value:

func(ttl time.Duration) time.Duration { return time.Duration(float64(ttl.Nanoseconds())*0.25) * time.Nanosecond }
var DefaultMandatoryTimeoutFunc = writable

DefaultMandatoryTimeoutFunc set the mandatory timeout to 17% of remaining time - usually 10 minutes on 1 hour expiry

Value:

func(ttl time.Duration) time.Duration { return time.Duration(float64(ttl.Nanoseconds())*0.17) * time.Nanosecond }
var ErrFetchingIAMTokenFn = writable

ErrFetchingIAMTokenFn returns the error fetching token for Token Manager

Value:

func(err error) awserr.Error { return awserr.New("ErrFetchingIAMToken", "error fetching token", err) }
var NewTokenManager = writable

NewTokenManager token manager constructor using a custom initial function to retrieve first token

Value:

func(config *aws.Config, initFunc func() (*token.Token, error), authEndPoint string, advisoryRefreshTimeout, mandatoryRefreshTimeout func(time.Duration) time.Duration, timeFunc func() time.Time, client IBMClientDo) API { return newTokenManager(config, initFunc, authEndPoint, advisoryRefreshTimeout, mandatoryRefreshTimeout, timeFunc, client)
var NewTokenManagerFromAPIKey = writable

NewTokenManagerFromAPIKey token manager constructor using api key to retrieve first token

Value:

func(config *aws.Config, apiKey, authEndPoint string, advisoryRefreshTimeout, mandatoryRefreshTimeout func(time.Duration) time.Duration, timeFunc func() time.Time, client IBMClientDo) API { return newTokenManagerFromAPIKey(config, apiKey, authEndPoint, advisoryRefreshTimeout, mandatoryRefreshTimeout, timeFunc, client) }

Interface Summary collapse