Documentation

Overview

    Package tokenmanager contains various implementations of manipulate.TokenManager.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type PeriodicTokenManager

    type PeriodicTokenManager struct {
    	// contains filtered or unexported fields
    }

      A PeriodicTokenManager issues an renew tokens periodically.

      func NewPeriodicTokenManager

      func NewPeriodicTokenManager(validity time.Duration, issuerFunc TokenIssuerFunc) *PeriodicTokenManager

        NewPeriodicTokenManager returns a new PeriodicTokenManager backed by midgard.

        func NewX509TokenManager

        func NewX509TokenManager(url string, validity time.Duration, tlsConfig *tls.Config) *PeriodicTokenManager

          NewX509TokenManager returns a new X509TokenManager.

          func (*PeriodicTokenManager) Issue

          func (m *PeriodicTokenManager) Issue(ctx context.Context) (token string, err error)

            Issue issues a token.

            func (*PeriodicTokenManager) Run

            func (m *PeriodicTokenManager) Run(ctx context.Context, tokenCh chan string)

              Run runs the token renewal job.

              type TokenIssuerFunc

              type TokenIssuerFunc func(context.Context, time.Duration) (string, error)

                TokenIssuerFunc is the type of function that can be used to retrieve a token.

                Directories

                Path Synopsis
                Package providers contains helpers to retrieve tokens from cloud provider.
                Package providers contains helpers to retrieve tokens from cloud provider.