mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-04 03:42:49 +02:00
cache : add cache service (#457)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
8a9cb0f803
commit
dccc7cd2ff
46 changed files with 1837 additions and 587 deletions
|
@ -9,6 +9,8 @@ const (
|
|||
ServiceAuthorize = "authorize"
|
||||
// ServiceAuthenticate represents running the authenticate service component
|
||||
ServiceAuthenticate = "authenticate"
|
||||
// ServiceCache represents running the cache service component
|
||||
ServiceCache = "cache"
|
||||
)
|
||||
|
||||
// IsValidService checks to see if a service is a valid service mode
|
||||
|
@ -16,9 +18,10 @@ func IsValidService(s string) bool {
|
|||
switch s {
|
||||
case
|
||||
ServiceAll,
|
||||
ServiceProxy,
|
||||
ServiceAuthenticate,
|
||||
ServiceAuthorize,
|
||||
ServiceAuthenticate:
|
||||
ServiceCache,
|
||||
ServiceProxy:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -57,6 +60,17 @@ func IsProxy(s string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// IsCache checks to see if we should be running the proxy service
|
||||
func IsCache(s string) bool {
|
||||
switch s {
|
||||
case
|
||||
ServiceAll,
|
||||
ServiceCache:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IsAll checks to see if we should be running all services
|
||||
func IsAll(s string) bool {
|
||||
return s == ServiceAll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue