Documentation ¶
Overview ¶
Package clientconn provides client connection implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllModes = []Mode{NormalMode, ProxyMode, DiffNormalMode, DiffProxyMode}
AllModes includes all operation modes, with the first one being the default.
Functions ¶
This section is empty.
Types ¶
type ConnMetrics ¶ added in v0.2.1
type ConnMetrics struct {
// contains filtered or unexported fields
}
ConnMetrics represents conn metrics.
func (*ConnMetrics) Collect ¶ added in v0.2.1
func (cm *ConnMetrics) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*ConnMetrics) Describe ¶ added in v0.2.1
func (cm *ConnMetrics) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener accepts incoming client connections.
func NewListener ¶
func NewListener(opts *NewListenerOpts) *Listener
NewListener returns a new listener, configured by the NewListenerOpts argument.
func (*Listener) Addr ¶ added in v0.1.0
Addr returns listener's address. It can be used to determine an actually used port, if it was zero.
func (*Listener) Collect ¶ added in v0.0.6
func (l *Listener) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*Listener) Describe ¶ added in v0.0.6
func (l *Listener) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
type ListenerMetrics ¶ added in v0.0.5
type ListenerMetrics struct {
// contains filtered or unexported fields
}
ListenerMetrics represents listener metrics.
func (*ListenerMetrics) Collect ¶ added in v0.0.5
func (lm *ListenerMetrics) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*ListenerMetrics) Describe ¶ added in v0.0.5
func (lm *ListenerMetrics) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
type Mode ¶
type Mode string
Mode represents FerretDB mode of operation.
const ( // NormalMode only handles requests. NormalMode Mode = "normal" // ProxyMode only proxies requests to another wire protocol compatible service. ProxyMode Mode = "proxy" // DiffNormalMode both handles requests and proxies them, then logs the diff. // Only the FerretDB response is sent to the client. DiffNormalMode Mode = "diff-normal" // DiffProxyMode both handles requests and proxies them, then logs the diff. // Only the proxy response is sent to the client. DiffProxyMode Mode = "diff-proxy" )