Fifth Chapter Consul Key/value

Source: Internet
Author: User
Tags cas delete key

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.