-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: nacos configstore basically implementation configuration level …
…2 function Complete unit testing has not been conducted yet, there may be potential bugs. The internal details are not a bit messy yet, and some code needs to be refactored. Fixed a bug where the dataid configuration could not be successfully uploaded (listened to) if there were special characters that existed before.
- Loading branch information
Showing
4 changed files
with
242 additions
and
47 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
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,39 @@ | ||
package nacos | ||
|
||
import "errors" | ||
|
||
var ( | ||
// IllegalParam | ||
// This error is usually caused by the logic of the parameters, | ||
// such as filling in parameters with illegal characters | ||
IllegalParam = errors.New("illegal parameter") | ||
|
||
// InvalidDataId | ||
// The nacos data_id cannot be divided into key labels using the delimiter set in store instance. | ||
InvalidDataId = errors.New("invalid data_id") | ||
|
||
InvalidKey = errors.New("the key contains delimiter which are not allowed") | ||
InvalidLabel = errors.New("the label contains delimiter which are not allowed") | ||
InvalidGroup = errors.New("the group is consistent with the group stored in the set tag") | ||
) | ||
|
||
const ( | ||
defaultNamespaceId = "" // if this is not set, then nacos will use the default namespaceId. | ||
defaultGroup = "default" | ||
defaultLabel = "default" | ||
defaultLogDir = "/tmp/layotto/nacos/log" | ||
defaultCacheDir = "/tmp/layotto/nacos/cache" | ||
defaultLogLevel = "debug" | ||
defaultTimeout = 10 // second | ||
defaultTagGroup = "sidecar_config_tags" | ||
|
||
// Nacos does not allow setting some special characters in the key. | ||
// Only English characters and 4 special characters (".", ":", "-", "_") are allowed, with a maximum of 256 bytes. | ||
defaultDelimiter = ":" | ||
) | ||
|
||
// map keys | ||
const ( | ||
namespaceIdKey = "namespace_id" | ||
appNameKey = "app_name" | ||
) |
Oops, something went wrong.