elasticsearch

package
v0.0.0-...-b957f84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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) Name

func (e *Elasticsearch) Name() string

Name the name of the service

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL