ISM rewrite part 7

This commit is contained in:
Tracker-Friendly 2025-01-08 16:42:05 +00:00
parent 2ae6af81ab
commit b82928e820
1 changed files with 3 additions and 1 deletions

View File

@ -170,10 +170,12 @@ func (s *ServiceInitializationInformation) SendISMessage(forService uuid.UUID, m
return id return id
} }
func (s *InterServiceMessage) Respond(messageType MessageCode, message any) { func (s *InterServiceMessage) Respond(messageType MessageCode, message any, information ServiceInitializationInformation) {
s.ServiceID, s.ForServiceID = s.ForServiceID, s.ServiceID s.ServiceID, s.ForServiceID = s.ForServiceID, s.ServiceID
s.MessageType = messageType s.MessageType = messageType
s.Message = message s.Message = message
s.SentAt = time.Now()
information.Outbox <- *s
} }
func (s *ServiceInitializationInformation) SendAndAwaitISMessage(forService uuid.UUID, messageType MessageCode, message any, timeout time.Duration) (InterServiceMessage, error) { func (s *ServiceInitializationInformation) SendAndAwaitISMessage(forService uuid.UUID, messageType MessageCode, message any, timeout time.Duration) (InterServiceMessage, error) {