Documentation ¶
Overview ¶
Package service wraps SSM service
Package service wraps SSM service
Index ¶
- Constants
- type AssociationService
- func (s *AssociationService) CreateNewServiceIfUnHealthy(log log.T)
- func (s *AssociationService) DescribeAssociation(log log.T, instanceID string, docName string) (response *ssm.DescribeAssociationOutput, err error)
- func (s *AssociationService) IsInstanceAssociationApiMode() bool
- func (s *AssociationService) ListAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error)
- func (s *AssociationService) ListInstanceAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error)
- func (s *AssociationService) LoadAssociationDetail(log log.T, assoc *model.InstanceAssociation) error
- func (s *AssociationService) UpdateAssociationStatus(log log.T, associationName string, instanceID string, status string, ...)
- func (s *AssociationService) UpdateInstanceAssociationStatus(log log.T, associationID string, associationName string, instanceID string, ...)
- type AssociationServiceMock
- func (m *AssociationServiceMock) CreateNewServiceIfUnHealthy(log log.T)
- func (m *AssociationServiceMock) DescribeAssociation(log log.T, instanceID string, docName string) (response *ssm.DescribeAssociationOutput, err error)
- func (m *AssociationServiceMock) IsInstanceAssociationApiMode() bool
- func (m *AssociationServiceMock) ListInstanceAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error)
- func (m *AssociationServiceMock) LoadAssociationDetail(log log.T, assoc *model.InstanceAssociation) error
- func (m *AssociationServiceMock) UpdateAssociationStatus(log log.T, associationName string, instanceID string, status string, ...)
- func (m *AssociationServiceMock) UpdateInstanceAssociationStatus(log log.T, associationID string, associationName string, instanceID string, ...)
- type T
Constants ¶
const (
NoOutputUrl = ""
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociationService ¶
type AssociationService struct {
// contains filtered or unexported fields
}
AssociationService wraps the Ssm Service
func NewAssociationService ¶
func NewAssociationService(name string) *AssociationService
NewAssociationService returns a new association service
func (*AssociationService) CreateNewServiceIfUnHealthy ¶
func (s *AssociationService) CreateNewServiceIfUnHealthy(log log.T)
CreateNewServiceIfUnHealthy checks service healthy and create new service if original is unhealthy
func (*AssociationService) DescribeAssociation ¶
func (s *AssociationService) DescribeAssociation(log log.T, instanceID string, docName string) (response *ssm.DescribeAssociationOutput, err error)
DescribeAssociation wraps ssm service DescribeAssociation
func (*AssociationService) IsInstanceAssociationApiMode ¶
func (s *AssociationService) IsInstanceAssociationApiMode() bool
UsingInstanceAssociationApi represents if the agent is using new InstanceAssociationApi for listing and updating
func (*AssociationService) ListAssociations ¶
func (s *AssociationService) ListAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error)
ListAssociations will get the Association and related document string from legacy api
func (*AssociationService) ListInstanceAssociations ¶
func (s *AssociationService) ListInstanceAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error)
ListInstanceAssociations will get the Association and related document string
func (*AssociationService) LoadAssociationDetail ¶
func (s *AssociationService) LoadAssociationDetail(log log.T, assoc *model.InstanceAssociation) error
LoadAssociationDetail loads document contents and parameters for the given association
func (*AssociationService) UpdateAssociationStatus ¶
func (s *AssociationService) UpdateAssociationStatus( log log.T, associationName string, instanceID string, status string, executionSummary string)
UpdateAssociationStatus update association status
func (*AssociationService) UpdateInstanceAssociationStatus ¶
func (s *AssociationService) UpdateInstanceAssociationStatus( log log.T, associationID string, associationName string, instanceID string, status string, errorCode string, executionDate string, executionSummary string, outputUrl string)
UpdateInstanceAssociationStatus will get the Association and related document string
type AssociationServiceMock ¶
AssociationServiceMock stands for a mocked association service.
func NewMockDefault ¶
func NewMockDefault() *AssociationServiceMock
NewMockDefault returns an instance of Mock with default expectations set.
func (*AssociationServiceMock) CreateNewServiceIfUnHealthy ¶
func (m *AssociationServiceMock) CreateNewServiceIfUnHealthy(log log.T)
CreateNewServiceIfUnHealthy mocks implementation for CreateNewServiceIfUnHealthy
func (*AssociationServiceMock) DescribeAssociation ¶
func (m *AssociationServiceMock) DescribeAssociation(log log.T, instanceID string, docName string) (response *ssm.DescribeAssociationOutput, err error)
DescribeAssociation mocks implementation for DescribeAssociation
func (*AssociationServiceMock) IsInstanceAssociationApiMode ¶
func (m *AssociationServiceMock) IsInstanceAssociationApiMode() bool
UsesInstanceAssociationApi mocks implementation for UsesInstanceAssociationApi
func (*AssociationServiceMock) ListInstanceAssociations ¶
func (m *AssociationServiceMock) ListInstanceAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error)
ListInstanceAssociations mocks implementation for ListAssociations
func (*AssociationServiceMock) LoadAssociationDetail ¶
func (m *AssociationServiceMock) LoadAssociationDetail(log log.T, assoc *model.InstanceAssociation) error
LoadAssociationDetail mocks implementation for LoadAssociationDetail
func (*AssociationServiceMock) UpdateAssociationStatus ¶
func (m *AssociationServiceMock) UpdateAssociationStatus( log log.T, associationName string, instanceID string, status string, executionSummary string)
UpdateAssociationStatus mocks implementation for UpdateAssociationStatus
func (*AssociationServiceMock) UpdateInstanceAssociationStatus ¶
func (m *AssociationServiceMock) UpdateInstanceAssociationStatus( log log.T, associationID string, associationName string, instanceID string, status string, errorCode string, executionDate string, executionSummary string, outputUrl string)
UpdateInstanceAssociationStatus mocks implementation for UpdateInstanceAssociationStatus
type T ¶
type T interface { CreateNewServiceIfUnHealthy(log log.T) ListInstanceAssociations(log log.T, instanceID string) ([]*model.InstanceAssociation, error) LoadAssociationDetail(log log.T, assoc *model.InstanceAssociation) error UpdateAssociationStatus( log log.T, associationName string, instanceID string, status string, executionSummary string) UpdateInstanceAssociationStatus( log log.T, associationID string, associationName string, instanceID string, status string, errorCode string, executionDate string, executionSummary string, outputUrl string) IsInstanceAssociationApiMode() bool DescribeAssociation(log log.T, instanceID string, docName string) (response *ssm.DescribeAssociationOutput, err error) }
T represents interface for association