Documentation ¶
Overview ¶
Package pg provides PostgreSQL handler.
Index ¶
- func New(opts *NewOpts) (handlers.Interface, error)
- type Handler
- func (h *Handler) Close()
- func (h *Handler) CmdQuery(ctx context.Context, query *wire.OpQuery) (*wire.OpReply, error)
- func (h *Handler) Collect(ch chan<- prometheus.Metric)
- func (h *Handler) DBPool(ctx context.Context) (*pgdb.Pool, error)
- func (h *Handler) Describe(ch chan<- *prometheus.Desc)
- func (h *Handler) MsgAggregate(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgBuildInfo(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgCollMod(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgCollStats(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgConnectionStatus(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgCount(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgCreate(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgCreateIndexes(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgCurrentOp(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDBStats(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDataSize(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDebugError(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDelete(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDistinct(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDrop(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDropDatabase(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgDropIndexes(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgExplain(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgFind(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgFindAndModify(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgGetCmdLineOpts(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgGetFreeMonitoringStatus(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgGetLog(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgGetMore(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgGetParameter(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgHello(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgHostInfo(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgInsert(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgIsMaster(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgKillCursors(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgListCollections(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgListCommands(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgListDatabases(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgListIndexes(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgLogout(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgPing(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgRenameCollection(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgSASLStart(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgServerStatus(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgSetFreeMonitoring(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgUpdate(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgValidate(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- func (h *Handler) MsgWhatsMyURI(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
- type NewOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct { *NewOpts // contains filtered or unexported fields }
Handler implements handlers.Interface on PostgreSQL.
func (*Handler) Close ¶ added in v0.2.1
func (h *Handler) Close()
Close implements HandlerInterface.
func (*Handler) Collect ¶ added in v1.5.0
func (h *Handler) Collect(ch chan<- prometheus.Metric)
Collect implements handlers.Interface.
func (*Handler) DBPool ¶ added in v0.8.0
DBPool returns database connection pool for the given client connection.
Pool is not closed when ctx is canceled.
func (*Handler) Describe ¶ added in v1.5.0
func (h *Handler) Describe(ch chan<- *prometheus.Desc)
Describe implements handlers.Interface.
func (*Handler) MsgAggregate ¶ added in v0.5.2
MsgAggregate implements HandlerInterface.
func (*Handler) MsgBuildInfo ¶
MsgBuildInfo implements HandlerInterface.
func (*Handler) MsgCollMod ¶ added in v0.5.3
MsgCollMod implements HandlerInterface.
func (*Handler) MsgCollStats ¶
MsgCollStats implements HandlerInterface.
func (*Handler) MsgConnectionStatus ¶ added in v0.2.1
MsgConnectionStatus implements HandlerInterface.
func (*Handler) MsgCreateIndexes ¶
MsgCreateIndexes implements HandlerInterface.
func (*Handler) MsgCurrentOp ¶ added in v0.8.0
MsgCurrentOp implements HandlerInterface.
func (*Handler) MsgDBStats ¶
MsgDBStats implements HandlerInterface.
func (*Handler) MsgDataSize ¶
MsgDataSize implements HandlerInterface.
func (*Handler) MsgDebugError ¶ added in v0.2.0
MsgDebugError implements HandlerInterface.
func (*Handler) MsgDistinct ¶ added in v0.8.1
MsgDistinct implements HandlerInterface.
func (*Handler) MsgDropDatabase ¶
MsgDropDatabase implements HandlerInterface.
func (*Handler) MsgDropIndexes ¶ added in v1.0.0
MsgDropIndexes implements HandlerInterface.
func (*Handler) MsgExplain ¶ added in v0.5.1
MsgExplain implements HandlerInterface.
func (*Handler) MsgFindAndModify ¶ added in v0.2.0
MsgFindAndModify implements HandlerInterface.
func (*Handler) MsgGetCmdLineOpts ¶
MsgGetCmdLineOpts implements HandlerInterface.
func (*Handler) MsgGetFreeMonitoringStatus ¶ added in v0.4.0
func (h *Handler) MsgGetFreeMonitoringStatus(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg, error)
MsgGetFreeMonitoringStatus implements HandlerInterface.
func (*Handler) MsgGetMore ¶ added in v0.9.2
MsgGetMore implements handlers.Interface.
func (*Handler) MsgGetParameter ¶
MsgGetParameter implements HandlerInterface.
func (*Handler) MsgHostInfo ¶
MsgHostInfo implements HandlerInterface.
func (*Handler) MsgIsMaster ¶
MsgIsMaster implements HandlerInterface.
func (*Handler) MsgKillCursors ¶ added in v1.6.0
MsgKillCursors implements handlers.Interface.
func (*Handler) MsgListCollections ¶
MsgListCollections implements HandlerInterface.
func (*Handler) MsgListCommands ¶ added in v0.2.0
MsgListCommands implements handlers.Interface.
func (*Handler) MsgListDatabases ¶
MsgListDatabases implements HandlerInterface.
func (*Handler) MsgListIndexes ¶ added in v0.7.0
MsgListIndexes implements HandlerInterface.
func (*Handler) MsgRenameCollection ¶ added in v1.1.0
MsgRenameCollection implements HandlerInterface.
func (*Handler) MsgSASLStart ¶ added in v0.8.0
MsgSASLStart implements HandlerInterface.
func (*Handler) MsgServerStatus ¶
MsgServerStatus implements HandlerInterface.
func (*Handler) MsgSetFreeMonitoring ¶ added in v0.4.0
MsgSetFreeMonitoring implements HandlerInterface.
func (*Handler) MsgValidate ¶ added in v0.7.1
MsgValidate implements HandlerInterface.
Source Files ¶
- cmd_query.go
- msg_aggregate.go
- msg_buildinfo.go
- msg_collmod.go
- msg_collstats.go
- msg_connectionstatus.go
- msg_count.go
- msg_create.go
- msg_createindexes.go
- msg_currentop.go
- msg_datasize.go
- msg_dbstats.go
- msg_debugerror.go
- msg_delete.go
- msg_distinct.go
- msg_drop.go
- msg_dropdatabase.go
- msg_dropindexes.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_killcursors.go
- msg_listcollections.go
- msg_listcommands.go
- msg_listdatabases.go
- msg_listindexes.go
- msg_logout.go
- msg_ping.go
- msg_renamecollection.go
- msg_saslstart.go
- msg_serverstatus.go
- msg_setfreemonitoring.go
- msg_update.go
- msg_validate.go
- msg_whatsmyuri.go
- pg.go