1. Key/value effect
- To modify a configuration file dynamically
- Support for service collaboration
- Establishment of leader elections
- Provide service discovery
- Integrated Health Check
2. Use
2.1. View all Key/value
Description
- Use the? recurse parameter to specify to view multiple kv
- No value--404
2.2. Add Key/value
Description: Key--zjg/key1 value--' Test '
Description: flags--is used to add a meaningful metadata for any kv.
Note: The top of this is problematic, be sure to note that it is flags rather than flag.
2.3. View a single Key/value
Description: Value is the base64 encoding of test (using Base64 encoding to allow non-UTF-8 characters)
2.4, modify the Key/value
Note: Modifying is exactly the same as adding a command, simply modifying the contents of the modified section.
CAS modification: (Atomic execution modification)
If the value of CAS is equal to Modifyindex, the modification succeeds, and if not equal, the modification fails.
2.5. Delete Key/value
2.5.1, delete single kv
2.5.2, remove a range of KV (specify the range of kv in the prefix)
Description
- Specifies the prefix of the deleted kv K (ZJG)
- Must have more than one operation? recurse parameters
Fifth Chapter Consul Key/value