You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

exec.go 493 B

12345678910111213141516171819202122232425
  1. package exec
  2. import (
  3. "gitlink.org.cn/cloudream/common/pkgs/types"
  4. "gitlink.org.cn/cloudream/common/utils/reflect2"
  5. "gitlink.org.cn/cloudream/common/utils/serder"
  6. )
  7. type PlanID string
  8. type Plan struct {
  9. ID PlanID `json:"id"`
  10. Ops []Op `json:"ops"`
  11. }
  12. var opUnion = serder.UseTypeUnionExternallyTagged(types.Ref(types.NewTypeUnion[Op]()))
  13. type Op interface {
  14. Execute(ctx *ExecContext, e *Executor) error
  15. String() string
  16. }
  17. func UseOp[T Op]() {
  18. opUnion.Add(reflect2.TypeOf[T]())
  19. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。