MCPcopy
hub / github.com/git-lfs/git-lfs / exchangeMessage

Method exchangeMessage

tq/custom.go:204–210  ·  view source on GitHub ↗

exchangeMessage sends a message to a process and reads a response if resp != nil Only fatal errors to communicate return an error, errors may be embedded in reply

(ctx *customAdapterWorkerContext, req interface{})

Source from the content-addressed store, hash-verified

202// exchangeMessage sends a message to a process and reads a response if resp != nil
203// Only fatal errors to communicate return an error, errors may be embedded in reply
204func (a *customAdapter) exchangeMessage(ctx *customAdapterWorkerContext, req interface{}) (*customAdapterResponseMessage, error) {
205 err := a.sendMessage(ctx, req)
206 if err != nil {
207 return nil, err
208 }
209 return a.readResponse(ctx)
210}
211
212// shutdownWorkerProcess terminates gracefully a custom adapter process
213// returns an error if it couldn't shut down gracefully (caller may abortWorkerProcess)

Callers 1

WorkerStartingMethod · 0.95

Calls 2

sendMessageMethod · 0.95
readResponseMethod · 0.95

Tested by

no test coverage detected