Documentation ¶
Overview ¶
Package tjupdate contains Updater, which handles an UpdateTryjobTask.
This involves updating a Tryjob by querying the backend system, and updating Tryjob entities in Datastore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater knows how to update Tryjobs, notifying other CV parts as needed.
func NewUpdater ¶
NewUpdater creates a new Updater.
Starts without backends, but they should be added via RegisterBackend().
func (*Updater) RegisterBackend ¶
func (u *Updater) RegisterBackend(b updaterBackend)
RegisterBackend registers a backend.
Panics if backend for the same kind is already registered.
func (*Updater) Update ¶
Update updates the Tryjob entity associated with the given `eid`.
`data` should contain the latest information of the Tryjob from the Tryjob backend system (e.g. Build proto from Buildbucket pubsub).
No-op if the Tryjob data stored in CV appears to be newer than the provided data (e.g. has newer Tryjob.Result.UpdateTime)