Documentation ¶
Index ¶
- type Elasticsearch
- func (e *Elasticsearch) Close() error
- func (e *Elasticsearch) Connect() error
- func (e *Elasticsearch) Enable(enabled bool)
- func (e *Elasticsearch) GetCheckInterval() int
- func (e *Elasticsearch) GetDownTimeDiff() string
- func (e *Elasticsearch) GetMessage() string
- func (e *Elasticsearch) GetNotificators() []tob.Notificator
- func (e *Elasticsearch) IsEnabled() bool
- func (e *Elasticsearch) IsRecover() bool
- func (e *Elasticsearch) Name() string
- func (e *Elasticsearch) Ping() []byte
- func (e *Elasticsearch) SetCheckInterval(interval int)
- func (e *Elasticsearch) SetConfig(configs config.Config)
- func (e *Elasticsearch) SetLastDownTimeNow()
- func (e *Elasticsearch) SetMessage(message string)
- func (e *Elasticsearch) SetNotificatorConfig(configs config.Config)
- func (e *Elasticsearch) SetRecover(recovered bool)
- func (e *Elasticsearch) SetURL(url string)
- func (e *Elasticsearch) Stop() chan bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elasticsearch ¶
type Elasticsearch struct {
// contains filtered or unexported fields
}
Elasticsearch service
func NewElasticsearch ¶
func NewElasticsearch(verbose bool, logger *log.Logger) *Elasticsearch
Elasticsearch's constructor
func (*Elasticsearch) Close ¶
func (e *Elasticsearch) Close() error
Close will close the service resources if needed
func (*Elasticsearch) Connect ¶
func (e *Elasticsearch) Connect() error
Connect to service if needed
func (*Elasticsearch) Enable ¶
func (e *Elasticsearch) Enable(enabled bool)
Enable will set enabled status to service
func (*Elasticsearch) GetCheckInterval ¶
func (e *Elasticsearch) GetCheckInterval() int
GetCheckInterval will return check interval to service
func (*Elasticsearch) GetDownTimeDiff ¶
func (e *Elasticsearch) GetDownTimeDiff() string
GetDownTimeDiff will return down time service difference in minutes
func (*Elasticsearch) GetMessage ¶
func (e *Elasticsearch) GetMessage() string
GetMessage will return additional message
func (*Elasticsearch) GetNotificators ¶
func (e *Elasticsearch) GetNotificators() []tob.Notificator
GetNotificators will return notificators
func (*Elasticsearch) IsEnabled ¶
func (e *Elasticsearch) IsEnabled() bool
IsEnabled will return enable status
func (*Elasticsearch) IsRecover ¶
func (e *Elasticsearch) IsRecover() bool
IsRecover will return recovered status
func (*Elasticsearch) Ping ¶
func (e *Elasticsearch) Ping() []byte
Ping will try to ping the service
func (*Elasticsearch) SetCheckInterval ¶
func (e *Elasticsearch) SetCheckInterval(interval int)
SetCheckInterval will set check interval to service
func (*Elasticsearch) SetConfig ¶
func (e *Elasticsearch) SetConfig(configs config.Config)
SetConfig will set config
func (*Elasticsearch) SetLastDownTimeNow ¶
func (e *Elasticsearch) SetLastDownTimeNow()
LastDownTime will set last down time of service to current time
func (*Elasticsearch) SetMessage ¶
func (e *Elasticsearch) SetMessage(message string)
SetMessage will set additional message
func (*Elasticsearch) SetNotificatorConfig ¶
func (e *Elasticsearch) SetNotificatorConfig(configs config.Config)
SetNotificatorConfig will set config
func (*Elasticsearch) SetRecover ¶
func (e *Elasticsearch) SetRecover(recovered bool)
SetRecover will set recovered status
func (*Elasticsearch) SetURL ¶
func (e *Elasticsearch) SetURL(url string)
SetURL will set the service URL
func (*Elasticsearch) Stop ¶
func (e *Elasticsearch) Stop() chan bool
Stop will receive stop channel