cache : add cache service (#457)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
Bobby DeSimone 2020-01-20 18:25:34 -08:00 committed by GitHub
parent 8a9cb0f803
commit dccc7cd2ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 1837 additions and 587 deletions

View file

@ -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