midgard-lib: go.aporeto.io/midgard-lib/tokenmanager Index | Files | Directories

package tokenmanager

import "go.aporeto.io/midgard-lib/tokenmanager"

Package tokenmanager contains various implementations of manipulate.TokenManager.

Index

Package Files

doc.go periodic.go x509.go

type PeriodicTokenManager Uses

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

A PeriodicTokenManager issues an renew tokens periodically.

func NewPeriodicTokenManager Uses

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

NewPeriodicTokenManager returns a new PeriodicTokenManager backed by midgard.

func NewX509TokenManager Uses

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

NewX509TokenManager returns a new X509TokenManager.

func (*PeriodicTokenManager) Issue Uses

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

Issue issues a token.

func (*PeriodicTokenManager) Run Uses

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

Run runs the token renewal job.

type TokenIssuerFunc Uses

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

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

Directories

PathSynopsis
providersPackage providers contains helpers to retrieve tokens from cloud provider.

Package tokenmanager imports 5 packages (graph). Updated 2019-08-16. Refresh now. Tools for package owners.