Documentation
¶
Overview ¶
Package handler provides implementations of command handlers.
Index ¶
- type Handler
- func (h *Handler) CmdQuery(connCtx context.Context, query *middleware.Request) (*middleware.Response, error)
- func (h *Handler) Collect(ch chan<- prometheus.Metric)
- func (h *Handler) Describe(ch chan<- *prometheus.Desc)
- func (h *Handler) Handle(ctx context.Context, req *middleware.Request) (*middleware.Response, error)
- func (h *Handler) Run(ctx context.Context)
- type NewOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
*NewOpts
// contains filtered or unexported fields
}
Handler provides a set of methods to process clients' requests sent over wire protocol.
The methods msgXXX handle OP_MSG commands. CmdQuery handles a limited subset of OP_QUERY messages.
Handler instance is shared between all client connections.
func New ¶
New returns a new handler. Handler.Run must be called on the returned value.
func (*Handler) CmdQuery ¶
func (h *Handler) CmdQuery(connCtx context.Context, query *middleware.Request) (*middleware.Response, error)
CmdQuery implements deprecated OP_QUERY message handling.
The passed context is canceled when the client connection is closed.
func (*Handler) Collect ¶
func (h *Handler) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*Handler) Describe ¶
func (h *Handler) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
func (*Handler) Handle ¶
func (h *Handler) Handle(ctx context.Context, req *middleware.Request) (*middleware.Response, error)
Handle implements middleware.Handler.
Source Files
¶
- cmd_query.go
- commands.go
- handler.go
- msg_aggregate.go
- msg_buildinfo.go
- msg_collmod.go
- msg_collstats.go
- msg_compact.go
- msg_connectionstatus.go
- msg_count.go
- msg_create.go
- msg_createindexes.go
- msg_createuser.go
- msg_currentop.go
- msg_datasize.go
- msg_dbstats.go
- msg_delete.go
- msg_distinct.go
- msg_docdbdebugerror.go
- msg_drop.go
- msg_dropallusersfromdatabase.go
- msg_dropdatabase.go
- msg_dropindexes.go
- msg_dropuser.go
- msg_endsessions.go
- msg_explain.go
- msg_find.go
- msg_findandmodify.go
- msg_getcmdlineopts.go
- msg_getfreemonitoringstatus.go
- msg_getlog.go
- msg_getmore.go
- msg_getparameter.go
- msg_hello.go
- msg_hostinfo.go
- msg_insert.go
- msg_ismaster.go
- msg_killallsessions.go
- msg_killallsessionsbypattern.go
- msg_killcursors.go
- msg_killsessions.go
- msg_listcollections.go
- msg_listcommands.go
- msg_listdatabases.go
- msg_listindexes.go
- msg_logout.go
- msg_ping.go
- msg_refreshsessions.go
- msg_reindex.go
- msg_renamecollection.go
- msg_saslcontinue.go
- msg_saslstart.go
- msg_serverstatus.go
- msg_setfreemonitoring.go
- msg_startsession.go
- msg_update.go
- msg_updateuser.go
- msg_usersinfo.go
- msg_validate.go
- msg_whatsmyuri.go
- params.go
- typecode.go
- typecode_string.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package middleware provides connection between listeners and handlers.
|
Package middleware provides connection between listeners and handlers. |
|
Package session provides access to session registry.
|
Package session provides access to session registry. |