cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheResponse

type CacheResponse struct {
	RoleARN  string
	Audience string
}

type FakeServiceAccountCache

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

FakeServiceAccountCache is a goroutine safe cache for testing

func NewFakeServiceAccountCache

func NewFakeServiceAccountCache(accounts ...*v1.ServiceAccount) *FakeServiceAccountCache

func (*FakeServiceAccountCache) Add

func (f *FakeServiceAccountCache) Add(name, namespace, role, aud string)

Add adds a cache entry

func (*FakeServiceAccountCache) Get

func (f *FakeServiceAccountCache) Get(name, namespace string) (role, aud string)

Get gets a service account from the cache

func (*FakeServiceAccountCache) Pop

func (f *FakeServiceAccountCache) Pop(name, namespace string)

Pop deletes a cache entry

func (*FakeServiceAccountCache) Start

func (f *FakeServiceAccountCache) Start()

Start does nothing

type ServiceAccountCache

type ServiceAccountCache interface {
	Start()
	Get(name, namespace string) (role, aud string)
}

func New

func New(defaultAudience, prefix string, clientset kubernetes.Interface) ServiceAccountCache

Jump to

Keyboard shortcuts

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