tokenclient

package
v0.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpiringSingletonTokenCache

type ExpiringSingletonTokenCache interface {
	ExpiringSingletonTokenCacheGet
	Set(token string, ttl time.Duration)
}

func NewExpiringSingletonTokenCache

func NewExpiringSingletonTokenCache() ExpiringSingletonTokenCache

type ExpiringSingletonTokenCacheGet

type ExpiringSingletonTokenCacheGet interface {
	Get() string
}

type Opt

type Opt func(client *TokenClient)

func WithExpirationSeconds

func WithExpirationSeconds(expirationSeconds int64) Opt

type TokenClient

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

func New

func New(
	serviceAccountName string,
	serviceAccountClient corev1client.ServiceAccountInterface,
	whatToDoWithToken WhatToDoWithTokenFunc,
	logger plog.Logger,
	opts ...Opt,
) *TokenClient

func (TokenClient) Start

func (tc TokenClient) Start(ctx context.Context)

type WhatToDoWithTokenFunc

type WhatToDoWithTokenFunc func(token string, ttl time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL