listener

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpListener

func NewHttpListener(conf *config.Listener) (proto.Listener, error)

func NewMysqlListener

func NewMysqlListener(conf *config.Listener) (proto.Listener, error)

Types

type HttpConfig

type HttpConfig struct {
	BackendHost string `yaml:"backend_host" json:"backend_host"`
	// ReadBufferSize default 4096 byte
	ReadBufferSize int `yaml:"read_buffer_size" json:"read_buffer_size"`
	// WriteBufferSize default 4096 byte
	WriteBufferSize int `yaml:"write_buffer_size" json:"write_buffer_size"`
	// MaxRequestBodySize default 4 * 1024 * 1024 byte
	MaxRequestBodySize int `yaml:"max_request_body_size" json:"max_request_body_size"`
}

type HttpListener

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

func (*HttpListener) Close

func (l *HttpListener) Close()

func (*HttpListener) Listen

func (l *HttpListener) Listen()

type MysqlConfig

type MysqlConfig struct {
	Users         map[string]string `yaml:"users" json:"users"`
	ServerVersion string            `yaml:"server_version" json:"server_version"`
}

type MysqlListener

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

func (*MysqlListener) Close

func (l *MysqlListener) Close()

func (*MysqlListener) ExecuteCommand

func (l *MysqlListener) ExecuteCommand(ctx context.Context, c *mysql.Conn, data []byte) error

func (*MysqlListener) Listen

func (l *MysqlListener) Listen()

func (*MysqlListener) SetExecutor

func (l *MysqlListener) SetExecutor(executor proto.Executor)

func (*MysqlListener) ValidateHash

func (l *MysqlListener) ValidateHash(user string, salt []byte, authResponse []byte) error

Jump to

Keyboard shortcuts

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