Add param ctx.
This commit is contained in:
parent
f17a4bdc82
commit
7033f4b75f
11
fcm.go
11
fcm.go
|
@ -327,13 +327,18 @@ func makeSendResponseFromPart(part *multipart.Part) (SendResponse, error) {
|
||||||
|
|
||||||
func (c *Client) SendEach(ctx context.Context, messages []Message) (MessageMultiSendResponse, error) {
|
func (c *Client) SendEach(ctx context.Context, messages []Message) (MessageMultiSendResponse, error) {
|
||||||
|
|
||||||
_, span := tracer.Start(ctx, "Client.SendEach")
|
ctx, span := tracer.Start(ctx, "Client.SendEach")
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
return c.doSendEachInBatch(messages, false)
|
return c.doSendEachInBatch(ctx, messages, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) doSendEachInBatch(messages []Message, validateOnly bool) (MessageMultiSendResponse, error) {
|
func (c *Client) doSendEachInBatch(
|
||||||
|
ctx context.Context,
|
||||||
|
messages []Message,
|
||||||
|
validateOnly bool,
|
||||||
|
) (MessageMultiSendResponse, error) {
|
||||||
|
|
||||||
messageCount := len(messages)
|
messageCount := len(messages)
|
||||||
if messageCount == 0 {
|
if messageCount == 0 {
|
||||||
return MessageMultiSendResponse{}, nil
|
return MessageMultiSendResponse{}, nil
|
||||||
|
|
Loading…
Reference in New Issue