kubernetes/staging/src/k8s.io/client-go/transport/token_source.go

// TokenSourceWrapTransport returns a WrapTransport that injects bearer tokens
// authentication from an oauth2.TokenSource.
func TokenSourceWrapTransport(ts oauth2.TokenSource) func(http.RoundTripper) http.RoundTripper {}

type ResettableTokenSource

// ResettableTokenSourceWrapTransport returns a WrapTransport that injects bearer tokens
// authentication from an ResettableTokenSource.
func ResettableTokenSourceWrapTransport(ts ResettableTokenSource) func(http.RoundTripper) http.RoundTripper {}

// NewCachedFileTokenSource returns a resettable token source which reads a
// token from a file at a specified path and periodically reloads it.
func NewCachedFileTokenSource(path string) *cachingTokenSource {}

// NewCachedTokenSource returns resettable token source with caching. It reads
// a token from a designed TokenSource if not in cache or expired.
func NewCachedTokenSource(ts oauth2.TokenSource) *cachingTokenSource {}

type tokenSourceTransport

var _

func (tst *tokenSourceTransport) RoundTrip(req *http.Request) (*http.Response, error) {}

func (tst *tokenSourceTransport) CancelRequest(req *http.Request) {}

func (tst *tokenSourceTransport) WrappedRoundTripper() http.RoundTripper {}

type fileTokenSource

var _

func (ts *fileTokenSource) Token() (*oauth2.Token, error) {}

type cachingTokenSource

func (ts *cachingTokenSource) Token() (*oauth2.Token, error) {}

func (ts *cachingTokenSource) ResetTokenOlderThan(t time.Time) {}