24 lines
408 B
Go
24 lines
408 B
Go
package event
|
|
|
|
import "gitlink.org.cn/cloudream/common/pkgs/future"
|
|
|
|
type JobUpdateFuture = *future.SetValueFuture[UpdateResult]
|
|
|
|
type Update struct {
|
|
Command string
|
|
Result JobUpdateFuture
|
|
}
|
|
|
|
func (s *Update) Noop() {}
|
|
|
|
type UpdateResult struct {
|
|
Err error
|
|
}
|
|
|
|
func NewUpdate(command string, jobUpdateFuture JobUpdateFuture) *Update {
|
|
return &Update{
|
|
Command: command,
|
|
Result: jobUpdateFuture,
|
|
}
|
|
}
|