Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProducer ¶
NewProducer creates a new producer actor by a consumer implementation and returns the PID of the ProducerActor. When a message is sent to the ProducerActor, it is automatically forwarded (i.e. published) to the provided topic in the stream.
Types ¶
type Consumer ¶
type Consumer interface { Init() error Subscribe(topic string) error NextMessage() (StreamMessage, error) }
type ConsumerActor ¶
type ConsumerActor struct { Consumer // contains filtered or unexported fields }
func NewConsumer ¶
func NewConsumer(consumer Consumer) (*ConsumerActor, *quacktors.Pid)
NewConsumer creates a new ConsumerActor by a consumer implementation and returns both a pointer to the ConsumerActor itself and the PID of the consumer. The pointer to the ConsumerActor can be used to subscribe to topics of the stream.
func (*ConsumerActor) Init ¶
func (c *ConsumerActor) Init(ctx *quacktors.Context)
type ProducerActor ¶
type ProducerActor struct {
Producer
}
func (*ProducerActor) Init ¶
func (p *ProducerActor) Init(ctx *quacktors.Context)
type StreamMessage ¶
Click to show internal directories.
Click to hide internal directories.