proxy

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 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

View Source
var (
	ErrInvalidLengthProxy        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProxy          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProxy = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type ExtraInfo added in v1.0.0

type ExtraInfo struct {
	// Salt is the bytes in MySQL protocol which is 20 length.
	Salt []byte
	// InternalConn indicates whether the connection is from internal
	// network or external network. false means that it is external, otherwise,
	// it is internal.
	InternalConn bool
	// Label is the requested label from client.
	Label RequestLabel
}

ExtraInfo is the information that proxy send to CN when build connection in handshake phase.

func (*ExtraInfo) Decode added in v1.0.0

func (e *ExtraInfo) Decode(reader *bufio.Reader) error

Decode decodes the ExtraInfo from bufio.Reader.

func (*ExtraInfo) Encode added in v1.0.0

func (e *ExtraInfo) Encode() ([]byte, error)

Encode encodes the ExtraInfo and return bytes.

type RequestLabel

type RequestLabel struct {
	Labels               map[string]string `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*RequestLabel) Descriptor

func (*RequestLabel) Descriptor() ([]byte, []int)

func (*RequestLabel) GetLabels

func (m *RequestLabel) GetLabels() map[string]string

func (*RequestLabel) Marshal

func (m *RequestLabel) Marshal() (dAtA []byte, err error)

func (*RequestLabel) MarshalTo

func (m *RequestLabel) MarshalTo(dAtA []byte) (int, error)

func (*RequestLabel) MarshalToSizedBuffer

func (m *RequestLabel) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RequestLabel) ProtoMessage

func (*RequestLabel) ProtoMessage()

func (*RequestLabel) Reset

func (m *RequestLabel) Reset()

func (*RequestLabel) Size

func (m *RequestLabel) Size() (n int)

func (*RequestLabel) String

func (m *RequestLabel) String() string

func (*RequestLabel) Unmarshal

func (m *RequestLabel) Unmarshal(dAtA []byte) error

func (*RequestLabel) XXX_DiscardUnknown

func (m *RequestLabel) XXX_DiscardUnknown()

func (*RequestLabel) XXX_Marshal

func (m *RequestLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RequestLabel) XXX_Merge

func (m *RequestLabel) XXX_Merge(src proto.Message)

func (*RequestLabel) XXX_Size

func (m *RequestLabel) XXX_Size() int

func (*RequestLabel) XXX_Unmarshal

func (m *RequestLabel) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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