feat: add trace and timeout support for the timer (#2750)

* feat: add trace and timeout support for the timer

Co-authored-by: gw123 <iamakillerforyou@gmail.com>
Signed-off-by: saltbo <saltbo@foxmail.com>

* fix: add error check for the lint

Signed-off-by: saltbo <saltbo@foxmail.com>

---------

Signed-off-by: saltbo <saltbo@foxmail.com>
Co-authored-by: gw123 <iamakillerforyou@gmail.com>
This commit is contained in:
Ambor
2023-03-29 09:27:55 +05:30
committed by GitHub
co-authored by gw123
parent 1f138d03fa
commit 2213ebc637
5 changed files with 61 additions and 7 deletions
+4 -2
View File
@@ -16,13 +16,15 @@ limitations under the License.
package publisher
import "context"
type (
// Publisher interface wraps the Publish method that publishes an request
// with given "body" and "headers" to given "target"
Publisher interface {
// Publish an request to a "target". Target's meaning depends on the
// Publish a request to a "target". Target's meaning depends on the
// publisher: it's a URL in the case of a webhook publisher, or a queue
// name in a queue-based publisher such as NATS.
Publish(body string, headers map[string]string, target string)
Publish(ctx context.Context, body string, headers map[string]string, target string)
}
)