Documentation ¶
Index ¶
- Constants
- func BackupDirName(conf *config.Config) string
- func BinLogDirName(conf *config.Config) string
- func ConfigDirName(conf *config.Config) string
- func NewMaster(slaveAddr string, lastSeq uint64, migration bool, unitId uint16, cli *Client, ...) *master
- func NewSlave(reqChan *RequestChan, bin *binlog.BinLog, mc *config.MasterConfig, ...) *slave
- func TableDirName(conf *config.Config) string
- type Client
- func (c *Client) AddResp(pkg []byte)
- func (c *Client) ClientType() uint32
- func (c *Client) Close()
- func (c *Client) GoRecvRequest(ch *RequestChan, slv *slave)
- func (c *Client) GoSendResponse()
- func (c *Client) IsAuth(dbId uint8) bool
- func (c *Client) IsClosed() bool
- func (c *Client) LocalAddr() net.Addr
- func (c *Client) RemoteAddr() net.Addr
- func (c *Client) SetAuth(dbId uint8)
- func (c *Client) SetClientType(cliType uint32)
- type Request
- type RequestChan
- type Server
Constants ¶
View Source
const ( ClientTypeNormal = iota ClientTypeMaster ClientTypeSlave )
Variables ¶
This section is empty.
Functions ¶
func BackupDirName ¶
func BinLogDirName ¶
func ConfigDirName ¶
func NewSlave ¶
func NewSlave(reqChan *RequestChan, bin *binlog.BinLog, mc *config.MasterConfig, adminPwd string) *slave
func TableDirName ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ClientType ¶
func (*Client) GoRecvRequest ¶
func (c *Client) GoRecvRequest(ch *RequestChan, slv *slave)
func (*Client) GoSendResponse ¶
func (c *Client) GoSendResponse()
func (*Client) IsAuth ¶
Check whether dbId is authencated. If dbId is 255, it means admin privilege.
func (*Client) RemoteAddr ¶
func (*Client) SetClientType ¶
type RequestChan ¶
Click to show internal directories.
Click to hide internal directories.