Documentation ¶
Index ¶
- type ComposeRoleArn
- type Entry
- type FakeServiceAccountCache
- func (f *FakeServiceAccountCache) Add(name, namespace, role, aud string, regionalSTS bool, tokenExpiration int64)
- func (f *FakeServiceAccountCache) Clear()
- func (f *FakeServiceAccountCache) Get(req Request) Response
- func (f *FakeServiceAccountCache) GetCommonConfigurations(name, namespace string) (useRegionalSTS bool, tokenExpiration int64)
- func (f *FakeServiceAccountCache) Pop(name, namespace string)
- func (f *FakeServiceAccountCache) Start(chan struct{})
- func (f *FakeServiceAccountCache) ToJSON() string
- type Request
- type Response
- type ServiceAccountCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposeRoleArn ¶ added in v0.5.0
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, regionalSTS bool, tokenExpiration int64)
Add adds a cache entry
func (*FakeServiceAccountCache) Clear ¶ added in v0.5.9
func (f *FakeServiceAccountCache) Clear()
func (*FakeServiceAccountCache) Get ¶
func (f *FakeServiceAccountCache) Get(req Request) Response
Get gets a service account from the cache
func (*FakeServiceAccountCache) GetCommonConfigurations ¶ added in v0.5.0
func (f *FakeServiceAccountCache) GetCommonConfigurations(name, namespace string) (useRegionalSTS bool, tokenExpiration int64)
func (*FakeServiceAccountCache) Pop ¶
func (f *FakeServiceAccountCache) Pop(name, namespace string)
Pop deletes a cache entry
func (*FakeServiceAccountCache) Start ¶
func (f *FakeServiceAccountCache) Start(chan struct{})
Start does nothing
func (*FakeServiceAccountCache) ToJSON ¶ added in v0.3.0
func (f *FakeServiceAccountCache) ToJSON() string
type ServiceAccountCache ¶
type ServiceAccountCache interface { Start(stop chan struct{}) Get(request Request) Response GetCommonConfigurations(name, namespace string) (useRegionalSTS bool, tokenExpiration int64) // ToJSON returns cache contents as JSON string ToJSON() string Clear() }
func New ¶
func New(defaultAudience, prefix string, defaultRegionalSTS bool, defaultTokenExpiration int64, saInformer coreinformers.ServiceAccountInformer, cmInformer coreinformers.ConfigMapInformer, composeRoleArn ComposeRoleArn) ServiceAccountCache
Click to show internal directories.
Click to hide internal directories.