Skip to content
Snippets Groups Projects
Commit c56f0f69 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

#19 endpoint for external cache input

parent b604d36b
Branches
Tags
1 merge request!8Endpoint for external cache input
Pipeline #52052 passed
......@@ -8,8 +8,6 @@ import (
cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/cloudevents/sdk-go/v2/event"
"github.com/google/uuid"
"code.vereign.com/gaiax/tsa/golib/errors"
)
const eventType = "External cache input"
......@@ -35,7 +33,7 @@ func (c *Client) Send(ctx context.Context, key string, data interface{}) error {
res := c.eventClient.Send(ctx, *e)
if cloudevents.IsUndelivered(res) {
return errors.New(fmt.Sprintf("failed to send event for key: %s, reason: %v", key, res))
return fmt.Errorf("failed to send event for key: %s, reason: %v", key, res)
}
return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment