gen_stage

Producer and consumer actors with back-pressure for Elixir

  • 所有者: elixir-lang/gen_stage
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

GenStage

GenStage is a specification for exchanging events between producers and consumers.

This project currently provides the following functionality:

  • GenStage (docs) - a behaviour for implementing producer and consumer stages

  • ConsumerSupervisor (docs) - a supervisor designed for consuming events from GenStage and starting a child process per event

You may also be interested in two other projects built on top of GenStage:

Examples

Examples for using GenStage and ConsumerSupervisor can be found in the examples directory:

  • ProducerConsumer - a simple example of setting up a pipeline of A -> B -> C stages and having events flowing through it

  • ConsumerSupervisor - an example of how to use one or more ConsumerSupervisor as a consumer to a producer that works as a counter

  • GenEvent - an example of how to use GenStage to implement an alternative to GenEvent that leverages concurrency and provides more flexibility regarding buffer size and back-pressure

  • RateLimiter - an example of performing rate limiting in a GenStage pipeline

Installation

GenStage requires Elixir v1.5. Just add :gen_stage to your list of dependencies in mix.exs:

def deps do
  [{:gen_stage, "~> 1.0"}]
end

License

Same as Elixir.

主要指標

概覽
名稱與所有者elixir-lang/gen_stage
主編程語言Elixir
編程語言Elixir (語言數: 1)
平台
許可證
所有者活动
創建於2015-08-26 17:57:36
推送於2025-02-09 09:56:19
最后一次提交
發布數27
最新版本名稱v1.2.1 (發布於 )
第一版名稱v0.4.0 (發布於 )
用户参与
星數1.5k
關注者數56
派生數195
提交數527
已啟用問題?
問題數132
打開的問題數1
拉請求數158
打開的拉請求數3
關閉的拉請求數17
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?