github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/actor/eventstream_process.go (about)

     1  package actor
     2  
     3  type EventStreamProcess struct {
     4  	system *ActorSystem
     5  }
     6  
     7  var _ Process = &EventStreamProcess{}
     8  
     9  func NewEventStreamProcess(actorSystem *ActorSystem) *EventStreamProcess {
    10  	return &EventStreamProcess{system: actorSystem}
    11  }
    12  
    13  func (e *EventStreamProcess) SendUserMessage(_ *PID, message interface{}) {
    14  	_, msg, _ := UnwrapEnvelope(message)
    15  	e.system.EventStream.Publish(msg)
    16  }
    17  
    18  func (e *EventStreamProcess) SendSystemMessage(_ *PID, _ interface{}) {
    19  	// pass
    20  }
    21  
    22  func (e *EventStreamProcess) Stop(_ *PID) {
    23  	// pass
    24  }