mysql

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 License: MIT Imports: 13 Imported by: 6 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
}

func (*Factory) Create

func (f *Factory) Create(config config.Config) (pool.StorageInterface, error)

type MysqlCapabilitiesModel

type MysqlCapabilitiesModel struct {
	ID          int    `db:"id"`
	NodeAddress string `db:"nodeAddress"`
	SetID       string `db:"setId"`
	Name        string `db:"name"`
	Value       string `db:"value"`
}

type MysqlNodeModel

type MysqlNodeModel struct {
	ID         string `db:"id"`
	Type       string `db:"type"`
	Address    string `db:"address"`
	Status     string `db:"status"`
	SessionID  string `db:"sessionId"`
	Updated    int64  `db:"updated"`
	Registered int64  `db:"registred"`
}

type MysqlStorage

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

func NewMysqlStorage

func NewMysqlStorage(db *sqlx.DB) *MysqlStorage

func (*MysqlStorage) Add

func (s *MysqlStorage) Add(node pool.Node, limit int) error

func (*MysqlStorage) GetAll

func (s *MysqlStorage) GetAll() ([]pool.Node, error)

func (*MysqlStorage) GetByAddress

func (s *MysqlStorage) GetByAddress(address string) (pool.Node, error)

func (*MysqlStorage) GetBySession

func (s *MysqlStorage) GetBySession(sessionID string) (pool.Node, error)

func (*MysqlStorage) GetCountWithStatus

func (s *MysqlStorage) GetCountWithStatus(status *pool.NodeStatus) (int, error)

func (*MysqlStorage) Remove

func (s *MysqlStorage) Remove(node pool.Node) error

func (*MysqlStorage) ReserveAvailable

func (s *MysqlStorage) ReserveAvailable(nodeList []pool.Node) (pool.Node, error)

func (*MysqlStorage) SetAvailable

func (s *MysqlStorage) SetAvailable(node pool.Node) error

func (*MysqlStorage) SetBusy

func (s *MysqlStorage) SetBusy(node pool.Node, sessionID string) error

Jump to

Keyboard shortcuts

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