Documentation ¶
Index ¶
- type MockAWSClient
- func (m *MockAWSClient) AccountNumber() string
- func (m *MockAWSClient) CheckInRancherLicense(ctx context.Context, consumptionToken string) (*lm.CheckInLicenseOutput, error)
- func (m *MockAWSClient) CheckoutRancherLicense(ctx context.Context, l types.GrantedLicense, entitlementAmt int) (*lm.CheckoutLicenseOutput, error)
- func (m *MockAWSClient) ExtendRancherLicenseConsumptionToken(ctx context.Context, consumptionToken string) (*lm.ExtendLicenseConsumptionOutput, error)
- func (m *MockAWSClient) GetNumberOfAvailableEntitlements(ctx context.Context, license types.GrantedLicense) (int, error)
- func (m *MockAWSClient) GetRancherLicense(ctx context.Context) (*types.GrantedLicense, error)
- type MockK8sClient
- func (m *MockK8sClient) GetConsumptionTokenSecret() (*corev1.Secret, error)
- func (m *MockK8sClient) GetRancherHostname() (string, error)
- func (m *MockK8sClient) GetRancherVersion() (string, error)
- func (m *MockK8sClient) UpdateCSPConfigOutput(marshalledData []byte) error
- func (m *MockK8sClient) UpdateConsumptionTokenSecret(data map[string]string) error
- func (m *MockK8sClient) UpdateUserNotification(isInCompliance bool, message string) error
- type MockScraper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAWSClient ¶
type MockAWSClient struct { AWSAccountNumber string License types.GrantedLicense CheckedOutEntitlements map[string]int CheckoutTokenCtr int }
func NewMockAWSClient ¶
func NewMockAWSClient(maxEntitlements int) *MockAWSClient
func (*MockAWSClient) AccountNumber ¶
func (m *MockAWSClient) AccountNumber() string
func (*MockAWSClient) CheckInRancherLicense ¶
func (m *MockAWSClient) CheckInRancherLicense(ctx context.Context, consumptionToken string) (*lm.CheckInLicenseOutput, error)
func (*MockAWSClient) CheckoutRancherLicense ¶
func (m *MockAWSClient) CheckoutRancherLicense(ctx context.Context, l types.GrantedLicense, entitlementAmt int) (*lm.CheckoutLicenseOutput, error)
func (*MockAWSClient) ExtendRancherLicenseConsumptionToken ¶
func (m *MockAWSClient) ExtendRancherLicenseConsumptionToken(ctx context.Context, consumptionToken string) (*lm.ExtendLicenseConsumptionOutput, error)
func (*MockAWSClient) GetNumberOfAvailableEntitlements ¶
func (m *MockAWSClient) GetNumberOfAvailableEntitlements(ctx context.Context, license types.GrantedLicense) (int, error)
func (*MockAWSClient) GetRancherLicense ¶
func (m *MockAWSClient) GetRancherLicense(ctx context.Context) (*types.GrantedLicense, error)
type MockK8sClient ¶
type MockK8sClient struct { CurrentSecretData map[string]string CurrentSupportConfig []byte CurrentNotificationMessage string RancherHostName string RancherVersion string }
func NewMockK8sClient ¶
func NewMockK8sClient(secretData map[string]string) *MockK8sClient
func (*MockK8sClient) GetConsumptionTokenSecret ¶
func (m *MockK8sClient) GetConsumptionTokenSecret() (*corev1.Secret, error)
func (*MockK8sClient) GetRancherHostname ¶
func (m *MockK8sClient) GetRancherHostname() (string, error)
func (*MockK8sClient) GetRancherVersion ¶
func (m *MockK8sClient) GetRancherVersion() (string, error)
func (*MockK8sClient) UpdateCSPConfigOutput ¶
func (m *MockK8sClient) UpdateCSPConfigOutput(marshalledData []byte) error
func (*MockK8sClient) UpdateConsumptionTokenSecret ¶
func (m *MockK8sClient) UpdateConsumptionTokenSecret(data map[string]string) error
func (*MockK8sClient) UpdateUserNotification ¶
func (m *MockK8sClient) UpdateUserNotification(isInCompliance bool, message string) error
type MockScraper ¶
type MockScraper struct {
Nodes int
}
func NewMockScraper ¶
func NewMockScraper(numNodes int) *MockScraper
func (*MockScraper) ScrapeAndParse ¶
func (m *MockScraper) ScrapeAndParse() (*metrics.NodeCounts, error)
Click to show internal directories.
Click to hide internal directories.