MCPcopy Create free account
hub / github.com/cortexlabs/cortex / getPayload

Method getPayload

pkg/dequeuer/async_handler.go:148–160  ·  view source on GitHub ↗
(requestID string)

Source from the content-addressed store, hash-verified

146}
147
148func (h *AsyncMessageHandler) getPayload(requestID string) (io.ReadCloser, error) {
149 key := async.PayloadPath(h.storagePath, requestID)
150 output, err := h.aws.S3().GetObject(
151 &s3.GetObjectInput{
152 Key: aws.String(key),
153 Bucket: aws.String(h.config.Bucket),
154 },
155 )
156 if err != nil {
157 return nil, errors.WithStack(err)
158 }
159 return output.Body, nil
160}
161
162func (h *AsyncMessageHandler) deletePayload(requestID string) {
163 key := async.PayloadPath(h.storagePath, requestID)

Callers 1

handleMessageMethod · 0.95

Calls 4

PayloadPathFunction · 0.92
WithStackFunction · 0.92
S3Method · 0.80
StringMethod · 0.45

Tested by

no test coverage detected