good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pggat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gfx
pggat
Commits
fb460c38
Commit
fb460c38
authored
Aug 23, 2024
by
Thomas Guinther
Browse files
Options
Downloads
Patches
Plain Diff
map string values to TracingOption value
parent
0152765d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/gat/handlers/pool/pools/basic/config.go
+18
-0
18 additions, 0 deletions
lib/gat/handlers/pool/pools/basic/config.go
with
18 additions
and
0 deletions
lib/gat/handlers/pool/pools/basic/config.go
+
18
−
0
View file @
fb460c38
...
...
@@ -2,6 +2,8 @@ package basic
import
(
"encoding/json"
"errors"
"strings"
"time"
"github.com/caddyserver/caddy/v2"
...
...
@@ -42,6 +44,22 @@ const (
TracingOptionClientAndServer
=
TracingOptionClient
|
TracingOptionServer
)
func
MapTracingOption
(
s
string
)
(
opt
TracingOption
,
err
error
)
{
switch
strings
.
ToLower
(
s
)
{
case
"disabled"
,
"none"
,
"off"
:
case
"client"
:
opt
=
TracingOptionClient
case
"server"
:
opt
=
TracingOptionServer
case
"client-and-server"
,
"both"
,
"all"
:
opt
=
TracingOptionClientAndServer
default
:
err
=
errors
.
New
(
"unknown tracing option: "
+
s
)
}
return
}
type
Config
struct
{
RawPoolerFactory
json
.
RawMessage
`json:"pooler" caddy:"namespace=pggat.handlers.pool.poolers inline_key=pooler"`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment