1 Star 2 Fork 0

李文建/light-protoactor-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
actor.go 612 Bytes
一键复制 编辑 原始数据 按行查看 历史
package actor
// The Producer type is a function that creates a new actor
type Producer func() Actor
// Actor is the interface that defines the Receive method.
//
// Receive is sent messages to be processed from the mailbox associated with the instance of the actor
type Actor interface {
Receive(c Context)
}
// The ActorFunc type is an adapter to allow the use of ordinary functions as actors to process messages
type ActorFunc func(c Context)
// Receive calls f(c)
func (f ActorFunc) Receive(c Context) {
f(c)
}
type SenderFunc func(c Context, target *PID, envelope messageEnvelope)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/lwj8507/light-protoactor-go.git
git@gitee.com:lwj8507/light-protoactor-go.git
lwj8507
light-protoactor-go
light-protoactor-go
013e33d7022f

搜索帮助