Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
5f9cba0f
Commit
5f9cba0f
authored
Jun 21, 2019
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddyfile: Move metrics into caddy package
parent
05b39385
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
caddy.go
caddy.go
+6
-0
caddyfile/parse.go
caddyfile/parse.go
+0
-3
No files found.
caddy.go
View file @
5f9cba0f
...
...
@@ -600,6 +600,12 @@ func ValidateAndExecuteDirectives(cdyfile Input, inst *Instance, justValidate bo
return
err
}
for
_
,
sb
:=
range
sblocks
{
for
dir
:=
range
sb
.
Tokens
{
telemetry
.
AppendUnique
(
"directives"
,
dir
)
}
}
inst
.
context
=
stype
.
NewContext
(
inst
)
if
inst
.
context
==
nil
{
return
fmt
.
Errorf
(
"server type %s produced a nil Context"
,
stypeName
)
...
...
caddyfile/parse.go
View file @
5f9cba0f
...
...
@@ -20,8 +20,6 @@ import (
"os"
"path/filepath"
"strings"
"github.com/mholt/caddy/telemetry"
)
// Parse parses the input just enough to group tokens, in
...
...
@@ -353,7 +351,6 @@ func (p *parser) directive() error {
// The directive itself is appended as a relevant token
p
.
block
.
Tokens
[
dir
]
=
append
(
p
.
block
.
Tokens
[
dir
],
p
.
tokens
[
p
.
cursor
])
telemetry
.
AppendUnique
(
"directives"
,
dir
)
for
p
.
Next
()
{
if
p
.
Val
()
==
"{"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment