good morning!!!!

Skip to content
Snippets Groups Projects
Verified Commit 94165dbc authored by a's avatar a
Browse files

noot

parent a626b85c
Branches
Tags
No related merge requests found
Pipeline #78845 passed
Pipeline: pggat

#78846

    ...@@ -218,7 +218,10 @@ func (T *Pool) Serve(conn *fed.Conn) error { ...@@ -218,7 +218,10 @@ func (T *Pool) Serve(conn *fed.Conn) error {
    client.Conn.Ready = true client.Conn.Ready = true
    } }
    poolLabels := prom.PoolSimpleLabels{} poolLabels := prom.PoolSimpleLabels{
    Database: conn.Database,
    User: conn.User,
    }
    { {
    if T.config.ReleaseAfterTransaction { if T.config.ReleaseAfterTransaction {
    poolLabels.Mode = "transaction" poolLabels.Mode = "transaction"
    ......
    ...@@ -450,7 +450,10 @@ func (T *Pool) serveOnly(l prom.PoolHybridLabels, conn *fed.Conn, write bool) er ...@@ -450,7 +450,10 @@ func (T *Pool) serveOnly(l prom.PoolHybridLabels, conn *fed.Conn, write bool) er
    } }
    func (T *Pool) Serve(conn *fed.Conn) error { func (T *Pool) Serve(conn *fed.Conn) error {
    labels := prom.PoolHybridLabels{} labels := prom.PoolHybridLabels{
    Database: conn.Database,
    User: conn.User,
    }
    switch conn.InitialParameters[strutil.MakeCIString("hybrid.mode")] { switch conn.InitialParameters[strutil.MakeCIString("hybrid.mode")] {
    case "ro": case "ro":
    labels.Mode = "ro" labels.Mode = "ro"
    ......
    ...@@ -12,6 +12,8 @@ func init() { ...@@ -12,6 +12,8 @@ func init() {
    type PoolHybridLabels struct { type PoolHybridLabels struct {
    Mode string `label:"mode"` Mode string `label:"mode"`
    Database string `label:"database"`
    User string `label:"user"`
    } }
    type OperationHybridLabels struct { type OperationHybridLabels struct {
    ...@@ -19,6 +21,8 @@ type OperationHybridLabels struct { ...@@ -19,6 +21,8 @@ type OperationHybridLabels struct {
    Mode string `label:"mode"` Mode string `label:"mode"`
    Target string `label:"target"` Target string `label:"target"`
    Database string `label:"database"`
    User string `label:"user"`
    } }
    func (s *PoolHybridLabels) ToOperation( func (s *PoolHybridLabels) ToOperation(
    ...@@ -27,6 +31,7 @@ func (s *PoolHybridLabels) ToOperation( ...@@ -27,6 +31,7 @@ func (s *PoolHybridLabels) ToOperation(
    return OperationHybridLabels{ return OperationHybridLabels{
    Pool: "hybrid", Pool: "hybrid",
    Mode: s.Mode, Mode: s.Mode,
    Database: s.Database,
    Target: target, Target: target,
    } }
    } }
    ......
    ...@@ -17,18 +17,23 @@ var PoolSimple struct { ...@@ -17,18 +17,23 @@ var PoolSimple struct {
    type PoolSimpleLabels struct { type PoolSimpleLabels struct {
    Mode string `label:"mode"` Mode string `label:"mode"`
    Database string `label:"database"`
    User string `label:"user"`
    } }
    func (s *PoolSimpleLabels) ToOperation() OperationSimpleLabels { func (s *PoolSimpleLabels) ToOperation() OperationSimpleLabels {
    return OperationSimpleLabels{ return OperationSimpleLabels{
    Pool: "basic", Pool: "basic",
    Mode: s.Mode, Mode: s.Mode,
    Database: s.Database,
    } }
    } }
    type OperationSimpleLabels struct { type OperationSimpleLabels struct {
    Pool string `label:"pool"` Pool string `label:"pool"`
    Mode string `label:"mode"` Mode string `label:"mode"`
    Database string `label:"database"`
    User string `label:"user"`
    } }
    var OperationSimple struct { var OperationSimple struct {
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment