Documentation ¶
Index ¶
- type CbitSqlDriver
- type CbitSqlInstance
- func (r *CbitSqlInstance) Close(name string) error
- func (r *CbitSqlInstance) Connect(name, path string, ...) (*websocketPool.Client, error)
- func (CbitSqlInstance) New(name, addr, username, password, pemPublicKeyBase64, aesKeySail string, ...) (*CbitSqlInstance, error)
- func (r *CbitSqlInstance) Parse(name string, resBasic *ResBasic) (*ResData, error)
- func (r *CbitSqlInstance) Reconnect(name string) (*websocketPool.Client, error)
- func (r *CbitSqlInstance) Send(name string, reqDataStr string) ([]byte, error)
- func (r *CbitSqlInstance) SetSession(name, session string) error
- type ClientRuntime
- type ReqBasic
- type ReqData
- type ReqDataParam
- type ResBasic
- type ResData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CbitSqlDriver ¶
type CbitSqlDriver struct {
// contains filtered or unexported fields
}
type CbitSqlInstance ¶
type CbitSqlInstance struct {
// contains filtered or unexported fields
}
var (
CbitSqlInstanceApp CbitSqlInstance
)
func (*CbitSqlInstance) Connect ¶
func (r *CbitSqlInstance) Connect( name, path string, receiveMsg func(instanceName, clientName string, propertyMessage []byte) ([]byte, error), heart *websocketPool.Heart, timeout *websocketPool.MessageTimeout, ) (*websocketPool.Client, error)
Connect 创建链接
func (CbitSqlInstance) New ¶
func (CbitSqlInstance) New( name, addr, username, password, pemPublicKeyBase64, aesKeySail string, needEncrypt bool, wcp *websocketPool.ClientPool, ) (*CbitSqlInstance, error)
New 实例化:自研数据库链接实例
func (*CbitSqlInstance) Parse ¶
func (r *CbitSqlInstance) Parse(name string, resBasic *ResBasic) (*ResData, error)
Parse 解析消息
func (*CbitSqlInstance) Reconnect ¶
func (r *CbitSqlInstance) Reconnect(name string) (*websocketPool.Client, error)
Reconnect 重连
func (*CbitSqlInstance) Send ¶
func (r *CbitSqlInstance) Send(name string, reqDataStr string) ([]byte, error)
Send 发送消息
func (*CbitSqlInstance) SetSession ¶
func (r *CbitSqlInstance) SetSession(name, session string) error
SetSession 设置session
type ClientRuntime ¶
type ClientRuntime struct {
// contains filtered or unexported fields
}
type ReqBasic ¶
type ReqData ¶
type ReqData struct { Sql string `json:"sql"` SessionId int32 `json:"session_id"` AutoCommit bool `json:"auto_commit"` FetchSize int32 `json:"fetch_size"` TaskId int32 `json:"task_id"` QueryTimeout int32 `json:"query_timeout"` UserName string `json:"user_name"` Password string `json:"password"` SendType string `json:"send_type"` Param []ReqDataParam `json:"param"` // contains filtered or unexported fields }
type ReqDataParam ¶
type ResBasic ¶
Click to show internal directories.
Click to hide internal directories.