Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-health
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-health
Commits
c1ee9df3
Commit
c1ee9df3
authored
Feb 19, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to current master
parent
d9d8848b
Pipeline
#420
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
25 deletions
+8
-25
README.rst
README.rst
+0
-1
vmod_health.c
src/vmod_health.c
+8
-24
No files found.
README.rst
View file @
c1ee9df3
...
...
@@ -269,4 +269,3 @@ COPYRIGHT
Author: Geoffrey Simmons <geoffrey.simmons@uplex.de>
src/vmod_health.c
View file @
c1ee9df3
...
...
@@ -27,7 +27,6 @@
#include "config.h"
#include "vrt.h"
#include "cache/cache.h"
#include "cache/cache_director.h"
#include "cache/cache_backend.h"
...
...
@@ -71,42 +70,27 @@ vmod_probe_healthy(VRT_CTX, VCL_BACKEND d)
CAST_OBJ
(
b
,
d
->
priv
,
BACKEND_MAGIC
);
if
(
b
->
probe
==
NULL
)
{
FAIL
(
ctx
,
"Backend %s has no health probe"
,
d
->
vcl_name
);
return
0
;
return
(
0
)
;
}
return
(
b
->
healthy
);
return
(
d
->
health
);
}
VCL_STRING
vmod_admin_health
(
VRT_CTX
,
VCL_BACKEND
d
)
{
struct
backend
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
d
,
DIRECTOR_MAGIC
);
if
(
d
->
priv
==
NULL
)
{
NOTABACKEND
(
ctx
,
d
);
return
NULL
;
}
(
void
)
ctx
;
CAST_OBJ
(
b
,
d
->
priv
,
BACKEND_MAGIC
);
AN
(
b
->
admin_health
);
return
(
b
->
admin_health
);
return
(
VDI_Ahealth
(
d
));
}
VCL_TIME
vmod_health_changed
(
VRT_CTX
,
VCL_BACKEND
d
)
{
struct
backend
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
d
,
DIRECTOR_MAGIC
);
if
(
d
->
priv
==
NULL
)
{
NOTABACKEND
(
ctx
,
d
);
return
0
.;
}
double
changed
;
(
void
)
ctx
;
CAST_OBJ
(
b
,
d
->
priv
,
BACKEND_MAGIC
);
return
(
b
->
health_
changed
);
VDI_Healthy
(
d
,
&
changed
);
return
(
changed
);
}
VCL_STRING
...
...
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