mongodb

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	// contains filtered or unexported fields
}

Mongo service

func NewMongo

func NewMongo(verbose bool, logger *log.Logger) *Mongo

NewMongo Mongo's constructor

func (*Mongo) Close

func (d *Mongo) Close() error

Close will close the service resources if needed

func (*Mongo) Connect

func (d *Mongo) Connect() error

Connect to service if needed

func (*Mongo) Enable

func (d *Mongo) Enable(enabled bool)

Enable will set enabled status to service

func (*Mongo) GetCheckInterval

func (d *Mongo) GetCheckInterval() int

GetCheckInterval will return check interval to service

func (*Mongo) GetDownTimeDiff

func (d *Mongo) GetDownTimeDiff() string

GetDownTimeDiff will return down time service difference in minutes

func (*Mongo) GetMessage

func (d *Mongo) GetMessage() string

GetMessage will return additional message

func (*Mongo) GetNotificators

func (d *Mongo) GetNotificators() []tob.Notificator

GetNotificators will return notificators

func (*Mongo) IsEnabled

func (d *Mongo) IsEnabled() bool

IsEnabled will return enable status

func (*Mongo) IsRecover

func (d *Mongo) IsRecover() bool

IsRecover will return recovered status

func (*Mongo) Name

func (d *Mongo) Name() string

Name the name of the service

func (*Mongo) Ping

func (d *Mongo) Ping() []byte

Ping will try to ping the service

func (*Mongo) SetCheckInterval

func (d *Mongo) SetCheckInterval(interval int)

SetCheckInterval will set check interval to service

func (*Mongo) SetConfig

func (d *Mongo) SetConfig(configs config.Config)

SetConfig will set config

func (*Mongo) SetLastDownTimeNow

func (d *Mongo) SetLastDownTimeNow()

LastDownTime will set last down time of service to current time

func (*Mongo) SetMessage

func (d *Mongo) SetMessage(message string)

SetMessage will set additional message

func (*Mongo) SetNotificatorConfig

func (d *Mongo) SetNotificatorConfig(configs config.Config)

SetNotificatorConfig will set config

func (*Mongo) SetRecover

func (d *Mongo) SetRecover(recovered bool)

SetRecover will set recovered status

func (*Mongo) SetURL

func (d *Mongo) SetURL(url string)

SetURL will set the service URL

func (*Mongo) Stop

func (d *Mongo) 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