Documentation ¶
Index ¶
- type CentreonHandler
- type CentreonHandlerImpl
- func (h *CentreonHandlerImpl) CreateService(service *CentreonService) (err error)
- func (h *CentreonHandlerImpl) CreateServiceGroup(sg *CentreonServiceGroup) (err error)
- func (h *CentreonHandlerImpl) DeleteService(host, name string) (err error)
- func (h *CentreonHandlerImpl) DeleteServiceGroup(name string) (err error)
- func (h *CentreonHandlerImpl) DiffService(actual, expected *CentreonService, ignoreFields []string) (diff *CentreonServiceDiff, err error)
- func (h *CentreonHandlerImpl) DiffServiceGroup(actual, expected *CentreonServiceGroup, ignoreFields []string) (diff *CentreonServiceGroupDiff, err error)
- func (h *CentreonHandlerImpl) GetService(host, name string) (service *CentreonService, err error)
- func (h *CentreonHandlerImpl) GetServiceGroup(name string) (sg *CentreonServiceGroup, err error)
- func (h *CentreonHandlerImpl) SetLogger(log *logrus.Entry)
- func (h *CentreonHandlerImpl) UpdateService(serviceDiff *CentreonServiceDiff) (err error)
- func (h *CentreonHandlerImpl) UpdateServiceGroup(serviceGroupDiff *CentreonServiceGroupDiff) (err error)
- type CentreonService
- type CentreonServiceDiff
- type CentreonServiceGroup
- type CentreonServiceGroupDiff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CentreonHandler ¶
type CentreonHandler interface { CreateService(service *CentreonService) (err error) UpdateService(service *CentreonServiceDiff) (err error) DeleteService(host, service string) (err error) GetService(host, name string) (service *CentreonService, err error) DiffService(actual, expected *CentreonService, ignoreFields []string) (diff *CentreonServiceDiff, err error) CreateServiceGroup(sg *CentreonServiceGroup) (err error) UpdateServiceGroup(sg *CentreonServiceGroupDiff) (err error) DeleteServiceGroup(name string) (err error) GetServiceGroup(name string) (sg *CentreonServiceGroup, err error) DiffServiceGroup(actual, expected *CentreonServiceGroup, ignoreFields []string) (diff *CentreonServiceGroupDiff, err error) SetLogger(log *logrus.Entry) }
func NewCentreonHandler ¶
func NewCentreonHandler(client *centreon.Client, log *logrus.Entry) CentreonHandler
type CentreonHandlerImpl ¶
type CentreonHandlerImpl struct {
// contains filtered or unexported fields
}
func (*CentreonHandlerImpl) CreateService ¶
func (h *CentreonHandlerImpl) CreateService(service *CentreonService) (err error)
CreateService permit to create new service on Centreon from spec
func (*CentreonHandlerImpl) CreateServiceGroup ¶
func (h *CentreonHandlerImpl) CreateServiceGroup(sg *CentreonServiceGroup) (err error)
CreateServiceGroup permit to create new serviceGroup on Centreon from spec
func (*CentreonHandlerImpl) DeleteService ¶
func (h *CentreonHandlerImpl) DeleteService(host, name string) (err error)
DeleteService permit to delete an existing service on Centreon
func (*CentreonHandlerImpl) DeleteServiceGroup ¶
func (h *CentreonHandlerImpl) DeleteServiceGroup(name string) (err error)
DeleteServiceGroup permit to delete an existing serviceGroup on Centreon
func (*CentreonHandlerImpl) DiffService ¶
func (h *CentreonHandlerImpl) DiffService(actual, expected *CentreonService, ignoreFields []string) (diff *CentreonServiceDiff, err error)
DiffService permit to compare actual and expected service to compute what is modified
func (*CentreonHandlerImpl) DiffServiceGroup ¶
func (h *CentreonHandlerImpl) DiffServiceGroup(actual, expected *CentreonServiceGroup, ignoreFields []string) (diff *CentreonServiceGroupDiff, err error)
DiffServiceGroup permit to diff actual and expected serviceGroup to know what it need to modify
func (*CentreonHandlerImpl) GetService ¶
func (h *CentreonHandlerImpl) GetService(host, name string) (service *CentreonService, err error)
GetService permit to get service by it name
func (*CentreonHandlerImpl) GetServiceGroup ¶
func (h *CentreonHandlerImpl) GetServiceGroup(name string) (sg *CentreonServiceGroup, err error)
GetServiceGroup permit to get serviceGroup by it name
func (*CentreonHandlerImpl) SetLogger ¶
func (h *CentreonHandlerImpl) SetLogger(log *logrus.Entry)
func (*CentreonHandlerImpl) UpdateService ¶
func (h *CentreonHandlerImpl) UpdateService(serviceDiff *CentreonServiceDiff) (err error)
UpdateService permit to update existing service on Centreon from spec
func (*CentreonHandlerImpl) UpdateServiceGroup ¶
func (h *CentreonHandlerImpl) UpdateServiceGroup(serviceGroupDiff *CentreonServiceGroupDiff) (err error)
UpdateServiceGroup permit to update existing serviceGroup on Centreon from spec
type CentreonService ¶
type CentreonService struct { Host string Name string CheckCommand string CheckCommandArgs string NormalCheckInterval string RetryCheckInterval string MaxCheckAttempts string ActiveCheckEnabled string PassiveCheckEnabled string Activated string Template string Comment string Groups []string Categories []string Macros []*models.Macro }
func (*CentreonService) String ¶
func (cs *CentreonService) String() string
type CentreonServiceDiff ¶
type CentreonServiceDiff struct { Host string Name string IsDiff bool GroupsToSet []string GroupsToDelete []string CategoriesToSet []string CategoriesToDelete []string MacrosToSet []*models.Macro MacrosToDelete []*models.Macro ParamsToSet map[string]string HostToSet string }
func (*CentreonServiceDiff) String ¶
func (csd *CentreonServiceDiff) String() string
type CentreonServiceGroup ¶
func (*CentreonServiceGroup) String ¶
func (cs *CentreonServiceGroup) String() string
type CentreonServiceGroupDiff ¶
func (*CentreonServiceGroupDiff) String ¶
func (csd *CentreonServiceGroupDiff) String() string