Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VersionHandler ¶
A VersionHandler is the type of the callbacks used by VersionWatcher.
type VersionWatcher ¶
type VersionWatcher struct { // A channel to monitor any fatal errors encountered by the version watcher. Status chan error LastCurrentHash string LastPendingHash string // contains filtered or unexported fields }
VersionWatcher handles the logic to wait for the version under fuzz to change in Google Storage. When it notices the pending version change or the current version change, it will fire off one of two provided callbacks. It also provides a way for clients to access the current and pending versions seen by this watcher. The callbacks are not fired on the initial values of the versions, only when a change happens.
func New ¶
func New(s fstorage.FuzzerGCSClient, period time.Duration, onPendingChange, onCurrentChange VersionHandler) *VersionWatcher
NewVersionWatcher creates a version watcher with the specified time period and access to GCS. The supplied callbacks may be nil.
func (*VersionWatcher) Recheck ¶
func (vw *VersionWatcher) Recheck()
Recheck forces a recheck of the pending and current version.
func (*VersionWatcher) Start ¶
func (vw *VersionWatcher) Start(ctx context.Context)
Start starts a goroutine that will occasionally wake up (as specified by the period) and check to see if the current or pending skia versions to fuzz have changed.