// Publish attaches an autoincrementing index to the message. // This function also execute's the client's PublishFunc mock function. func (c *MessagingClient) Publish(m *messaging.Message) (uint64, error) { c.mu.Lock() defer c.mu.Unlock() c.index++ m.Index = c.index return c.PublishFunc(m) }
// Publish attaches an autoincrementing index to the message. // This function also execute's the client's PublishFunc mock function. func (c *MessagingClient) Publish(m *messaging.Message) (uint64, error) { c.index++ m.Index = c.index return c.PublishFunc(m) }