Commit Graph

8 Commits

Author SHA1 Message Date
Derek McGowan
35eeb24a17
Fix exported comments enforcer in CI
Add comments where missing and fix incorrect comments

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08:00
Brian Goff
d7b9cb0019 shim: move event context timeout to publsher
Before this change, if an event fails to send on the first attempt,
subsequent attempts will fail with context.Cancelled because the the
caller of publish passes a cancellable timeout, which the publisher uses
to send the event.

The publisher returns immediately if the send fails, but adds the event
to an async queue to try again.
Meanwhile the caller will return cancelling the context.

Additionally, subsequent attempts may fail to send because the timeout
was expected to be for a single request but the queue sleeps for
`attempt*time.Second`.

In the shim service, the timeout was set to 5s, which means the send
will fail with context.DeadlineExceeded before it reaches `maxRequeue`
(which is currently 5).

This change moves the timeout to the publisher so each send attempt gets
its own timeout.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-07-20 17:51:10 -07:00
lifubang
488d6194f2 fix dial error when clean up a dead shim
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-03-12 10:57:55 +08:00
Kathryn Baldauf
2d8a65b1b2 Export shim publisher functions
- Our out of tree shim would like to publish events with ttrpc. These
functions should be exposed so our shim doesn't need to reimplement
publisher logic.

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2019-08-27 17:15:15 -07:00
Maksym Pavlenko
7f79fbb245 Move ttrpc client to pkg/ttrpcutil
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-05-20 16:44:49 -07:00
Maksym Pavlenko
7b06c9a1ce Add TTRPC client
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-05-13 21:05:07 -07:00
Michael Crosby
63c7a879b6 Requeue events in the shim publisher
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-12 11:57:20 -04:00
Michael Crosby
047348e198 Add dialer for events service
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-11 12:01:52 -04:00