global

package
v0.0.0-...-0f91579 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DBOMySQLPool *mysql.Pool
)

Functions

func InitDBOMySQLPool

func InitDBOMySQLPool() (err error)

InitDBOMySQLPool initializes the global DBOMySQLPool

Types

type PurgeRepo

type PurgeRepo struct {
	Database middleware.Pool
}

func NewPurgeRepo

func NewPurgeRepo(db middleware.Pool) *PurgeRepo

NewPurgeRepo returns a new *PurgeRepo

func NewPurgeRepoWithGlobal

func NewPurgeRepoWithGlobal() *PurgeRepo

NewPurgeRepoWithGlobal returns a new *PurgeRepo with global middleware.Pool

func (*PurgeRepo) Execute

func (pr *PurgeRepo) Execute(command string, args ...interface{}) (middleware.Result, error)

Execute executes given command and placeholders on the middleware

func (*PurgeRepo) PurgeMySQLOperationLock

func (pr *PurgeRepo) PurgeMySQLOperationLock() error

PurgeMySQLOperationLock purges the mysql operation lock

type PurgeService

type PurgeService struct {
	*PurgeRepo
}

func NewPurgeService

func NewPurgeService(repo *PurgeRepo) *PurgeService

NewPurgeService returns a new *PurgeService

func NewPurgeServiceWithDefault

func NewPurgeServiceWithDefault() *PurgeService

NewPurgeServiceWithDefault returns a new *PurgeService with global middleware.Pool

func (*PurgeService) PurgeMySQLOperationLock

func (ps *PurgeService) PurgeMySQLOperationLock()

Purge purges the mysql operation lock, it will execute periodically

Jump to

Keyboard shortcuts

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