Documentation ¶
Index ¶
- Constants
- type ComplianceUploader
- func (u *ComplianceUploader) ConvertToSsmAssociationComplianceItems(log log.T, associationComplianceEntries []*model.AssociationComplianceItem, ...) (associationComplianceItems []*ssm.ComplianceItemEntry, contentHash string, ...)
- func (u *ComplianceUploader) CreateNewServiceIfUnHealthy(log log.T)
- func (u *ComplianceUploader) UpdateAssociationCompliance(associationID string, instanceID string, documentName string, ...) error
- type ComplianceUploaderMock
- type T
Constants ¶
const ( Name = "ComplianceUploader" AssociationComplianceItemName = "AssociationComplianceItem" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComplianceUploader ¶
type ComplianceUploader struct {
// contains filtered or unexported fields
}
ComplianceService wraps the Ssm Service
func NewComplianceUploader ¶
func NewComplianceUploader(context context.T) *ComplianceUploader
NewComplianceService returns a new compliance service
func (*ComplianceUploader) ConvertToSsmAssociationComplianceItems ¶
func (u *ComplianceUploader) ConvertToSsmAssociationComplianceItems(log log.T, associationComplianceEntries []*model.AssociationComplianceItem, oldHash string) ( associationComplianceItems []*ssm.ComplianceItemEntry, contentHash string, err error)
ConvertToSsmAssociationComplianceItems converts given array of complianceItem into an array of *ssm.ComplianceItemEntry. It returns 2 such arrays - one is optimized array which contains only contentHash for those compliance types where the dataset hasn't changed from previous collection. The other array is non-optimized array which contains both contentHash & content. This is done to avoid iterating over the compliance data twice. It throws error when it encounters error during conversion process.
func (*ComplianceUploader) CreateNewServiceIfUnHealthy ¶
func (u *ComplianceUploader) CreateNewServiceIfUnHealthy(log log.T)
func (*ComplianceUploader) UpdateAssociationCompliance ¶
func (u *ComplianceUploader) UpdateAssociationCompliance(associationID string, instanceID string, documentName string, documentVersion string, associationStatus string, executionTime time.Time) error
*
- Update association compliance status, it only report status back when status is either SUCCESS / FAILED / TIMEDOUT
type ComplianceUploaderMock ¶
ComplianceUploaderMock stands for a mocked compliance uploader.
func NewMockDefault ¶
func NewMockDefault() *ComplianceUploaderMock
NewMockDefault returns an instance of Mock with default expectations set.
func (*ComplianceUploaderMock) CreateNewServiceIfUnHealthy ¶
func (m *ComplianceUploaderMock) CreateNewServiceIfUnHealthy(log log.T)