createAuthFunc 创建MySQL认证函数
(info *common.HostInfo, config *common.Config, state *common.State)
| 69 | |
| 70 | // createAuthFunc 创建MySQL认证函数 |
| 71 | func (p *MySQLPlugin) createAuthFunc(info *common.HostInfo, config *common.Config, state *common.State) AuthFunc { |
| 72 | return func(ctx context.Context, cred Credential) *AuthResult { |
| 73 | return p.doMySQLAuth(ctx, info, cred, config, state) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // doMySQLAuth 执行MySQL认证 |
| 78 | func (p *MySQLPlugin) doMySQLAuth(ctx context.Context, info *common.HostInfo, cred Credential, config *common.Config, state *common.State) *AuthResult { |