package
6.7.0-alpha+incompatible
Repository: https://github.com/tikv/pd.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

CollectEscapeStringOption is used to collect string using escaping from input map for given option.
CollectStringOption is used to collect string using from input map for given option.
DeferClose captures the error returned from closing (if an error occurs).
DoDelete is used to send delete request and return http response code.
ErrorResp Respond to the client about the given error, integrating with errcode.ErrorCode.
GetComponentNameOnHTTP returns component name from Request Header.
GetIPAddrFromHTTPRequest returns http client IP from context.
GetJSON is used to send GET requst to specific url.
GetRouteName return mux route name registered.
NewAccessPath returns an AccessPath.
NewComponentSignatureRoundTripper returns a new ComponentSignatureRoundTripper.
ParseKey is used to parse interface into []byte and string.
ParseUint64VarsField connects strconv.ParseUint with request variables It hardcodes the base to 10 and bit size to 64 Any error returned will connect the requested field to the error via FieldError.
PatchJSON is used to do patch request.
PostJSON is used to send the POST request to a specific URL.
PostJSONIgnoreResp is used to do post request with JSON body and ignore response.
ReadJSON reads a JSON data from r and then closes it.
ReadJSONRespondError writes json into data.
RegisterUserDefinedHandlers register the user defined handlers.
TagJSONError wraps the JSON error to one type.

# Constants

CorePath the core group, is at REST path `/pd/api/v1`.
ExtensionsPath the named groups are REST at `/pd/apis/{GROUP_NAME}/{Version}`.

# Structs

AccessPath is used to identify HTTP api access path including path and method.
APIServiceGroup used to register the HTTP REST API.
ComponentSignatureRoundTripper is used to add component signature in HTTP header.
FieldError connects an error to a particular field.
JSONError lets callers check for just one error type.