// MakeProductEvent prepares and sends the product event
MakeProductEvent prepares and sends the product event
// MakeProductEvent prepares and sends the product event
func MakeHeartBeatEvent(natsURL string, hEvent *HeartBeatEvent) error {
	mmsClient, err := NewNatsSenderClient(natsURL)
	if err != nil {
		return fmt.Errorf("failed to create messaging service: %v", err)
	}
	err = mmsClient.PostHeartBeat(hEvent)
	if err != nil {
		return fmt.Errorf("failed to post heartbeat to messaging service: %v", err)
	}
	mmsClient.cenatsSender.Close(context.Background())
	return nil
}
func MakeHeartBeatEvent ( natsURL string , hEvent * HeartBeatEvent ) error { mmsClient , err := NewNatsSenderClient ( natsURL ) if err != nil { return fmt . Errorf ( " " , err ) } err = mmsClient . PostHeartBeat ( hEvent ) if err != nil { return fmt . Errorf ( " " , err ) } mmsClient . cenatsSender . Close ( context . Background ( ) ) return nil }
MakeProductEvent prepares and sends the product event
MakeProductEvent prepares and sends the product event