orchestra:Orchestra是一个用于管理长时间运行的流程的库

时间:2021-03-08 13:00:13
【文件属性】:
文件名称:orchestra:Orchestra是一个用于管理长时间运行的流程的库
文件大小:7KB
文件格式:ZIP
更新时间:2021-03-08 13:00:13
Go 乐队 乐团是一个用于管理长时间运行的流程的库。 库的核心是一个名为Player的接口 // Player is a long running background worker type Player interface { Play (context. Context ) error } 满足接口所需的所有类型都需要有一个Play方法,该方法将在上下文完成后正常关闭。 如果在播放时遇到问题,它也可能返回错误。 接下来是导体类型(它本身是播放器) // Conductor is a group of workers. It is also a Player itself **evil laugh** type Conductor struct { Timeout time. Duration Players map [ string ] Player } 使用导体,您可以
【文件预览】:
orchestra-master
----.gitignore(0B)
----go.mod(50B)
----player.go(540B)
----server.go(917B)
----LICENSE(1KB)
----function.go(270B)
----go.sum(0B)
----README.md(5KB)
----conductor.go(3KB)
----types.go(194B)
----errors.go(744B)

网友评论