totalaccountwatcher

package
v0.0.0-...-4ed85c4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAwsAccountLimitExceeded = errors.New("AccountLimitExceeded")

ErrAwsAccountLimitExceeded indicates the organization account limit has been reached.

View Source
var TotalAccountWatcher = &AccountWatcher{}

TotalAccountWatcher global var for TotalAccountWatcher

Functions

This section is empty.

Types

type AccountWatcher

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

func (*AccountWatcher) AccountsCanBeCreated

func (s *AccountWatcher) AccountsCanBeCreated() bool

AccountsCanBeCreated returns whether we can create accounts or not

func (*AccountWatcher) GetAccountCount

func (s *AccountWatcher) GetAccountCount() int

GetAccountCount returns the number of accounts that are currently recorded.

func (*AccountWatcher) GetLimit

func (s *AccountWatcher) GetLimit() int

GetLimit returns the soft limit we have set in the configmap

func (*AccountWatcher) Start

func (s *AccountWatcher) Start(log logr.Logger, stopCh context.Context, client client.Client, watchInterval time.Duration)

TotalAccountWatcher will trigger AwsLimitUpdate every `scanInternal` and only stop if the operator is killed or a message is sent on the stopCh

func (*AccountWatcher) UpdateTotalAccounts

func (s *AccountWatcher) UpdateTotalAccounts(log logr.Logger) error

UpdateTotalAccounts will update the TotalAccountWatcher's total field

type AccountWatcherIface

type AccountWatcherIface interface {
	GetAccountCount() int
	GetLimit() int
}

Jump to

Keyboard shortcuts

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