-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/health endpoint now shows EE Features available (#5293)
- Loading branch information
parasssh
authored
Apr 27, 2020
1 parent
4dc4bd7
commit 51f8cfb
Showing
5 changed files
with
408 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// +build oss | ||
|
||
/* | ||
* Copyright 2020 Dgraph Labs, Inc. and Contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package ee | ||
|
||
// GetEEFeaturesList returns a list Enterprise Features that are available. | ||
func GetEEFeaturesList() []string { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// +build !oss | ||
|
||
/* | ||
* Copyright 2020 Dgraph Labs, Inc. and Contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package ee | ||
|
||
import ( | ||
"github.com/dgraph-io/dgraph/worker" | ||
) | ||
|
||
// GetEEFeaturesList returns a list of Enterprise Features that are available. | ||
func GetEEFeaturesList() []string { | ||
if !worker.EnterpriseEnabled() { | ||
return nil | ||
} | ||
var ee []string | ||
if len(worker.Config.HmacSecret) > 0 { | ||
ee = append(ee, "acl") | ||
} | ||
if worker.Config.BadgerKeyFile != "" { | ||
ee = append(ee, "encryption_at_rest", "encrypted_backup_restore", "encrypted_export") | ||
} else { | ||
ee = append(ee, "backup_restore") | ||
} | ||
return ee | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.