MCPcopy Index your code
hub / github.com/uber/aresdb / GetAssignmentHash

Method GetAssignmentHash

controller/client/controller.go:167–181  ·  view source on GitHub ↗

GetAssignmentHash get hash code of assignment

(jobNamespace, instance string)

Source from the content-addressed store, hash-verified

165
166// GetAssignmentHash get hash code of assignment
167func (c *ControllerHTTPClient) GetAssignmentHash(jobNamespace, instance string) (hash string, err error) {
168 request, err := c.buildRequest(http.MethodGet, fmt.Sprintf("assignment/%s/hash/%s", jobNamespace, instance), nil)
169 if err != nil {
170 return
171 }
172
173 bytes, err := c.getResponse(request)
174 if err != nil {
175 err = utils.StackError(err, "controller client error fetching assignment hash")
176 return
177 }
178
179 hash = string(bytes)
180 return
181}
182
183// GetAssignment gets the job assignment of the ares-subscriber
184func (c *ControllerHTTPClient) GetAssignment(jobNamespace, instance string) (assignment *models.IngestionAssignment, err error) {

Callers

nothing calls this directly

Calls 3

buildRequestMethod · 0.95
getResponseMethod · 0.95
StackErrorFunction · 0.92

Tested by

no test coverage detected