redisdb

package
v0.0.0-...-84c28f3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

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

Redis service

func NewRedis

func NewRedis(verbose bool, logger *log.Logger) *Redis

NewRedis Redis's constructor

func (*Redis) Close

func (d *Redis) Close() error

Close will close the service resources if needed

func (*Redis) Connect

func (d *Redis) Connect() error

Connect to service if needed

func (*Redis) Enable

func (d *Redis) Enable(enabled bool)

Enable will set enabled status to service

func (*Redis) GetCheckInterval

func (d *Redis) GetCheckInterval() int

GetCheckInterval will return check interval to service

func (*Redis) GetDownTimeDiff

func (d *Redis) GetDownTimeDiff() string

GetDownTimeDiff will return down time service difference in minutes

func (*Redis) GetMessage

func (d *Redis) GetMessage() string

GetMessage will return additional message

func (*Redis) IsEnabled

func (d *Redis) IsEnabled() bool

IsEnabled will return enable status

func (*Redis) IsRecover

func (d *Redis) IsRecover() bool

IsRecover will return recovered status

func (*Redis) Name

func (d *Redis) Name() string

Name the name of the service

func (*Redis) Ping

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

Ping will try to ping the service

func (*Redis) SetCheckInterval

func (d *Redis) SetCheckInterval(interval int)

SetCheckInterval will set check interval to service

func (*Redis) SetConfig

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

SetConfig will set config

func (*Redis) SetLastDownTimeNow

func (d *Redis) SetLastDownTimeNow()

LastDownTime will set last down time of service to current time

func (*Redis) SetMessage

func (d *Redis) SetMessage(message string)

SetMessage will set additional message

func (*Redis) SetRecover

func (d *Redis) SetRecover(recovered bool)

SetRecover will set recovered status

func (*Redis) SetURL

func (d *Redis) SetURL(url string)

SetURL will set the service URL

func (*Redis) Stop

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