// StopWorker -
// versionId -
358870
func (c *ServiceWorker) StopWorker(versionId string) (*gcdmessage.ChromeResponse, error) {
	var v ServiceWorkerStopWorkerParams
	v.VersionId = versionId
	return c.StopWorkerWithParams(&v)
}
999329
func NewSplitDiffWorker(wr *wrangler.Wrangler, cell, keyspace, shard string, sourceUID uint32, excludeTables []string, minHealthyRdonlyTablets, parallelDiffsCount int, tabletType topodatapb.TabletType) Worker {
	return &SplitDiffWorker{
		StatusWorker:            NewStatusWorker(),
		wr:                      wr,
		cell:                    cell,
		keyspace:                keyspace,
		shard:                   shard,
		sourceUID:               sourceUID,
		excludeTables:           excludeTables,
		minHealthyRdonlyTablets: minHealthyRdonlyTablets,
		destinationTabletType:   tabletType,
		parallelDiffsCount:      parallelDiffsCount,
		cleaner:                 &wrangler.Cleaner{},
	}
}
188365
func isNetworkError() hpredicate {
	return func(c *context) bool {
		return c.responseCode == http.StatusBadGateway || c.responseCode == http.StatusGatewayTimeout
	}
}
101374
func Version(url string, kvdbOptions map[string]string) (string, error) {
	return kvdb.ZookeeperVersion1, nil
}
810911
func (r *StateRestore) JobVersionRestore(version *structs.Job) error {
	if err := r.txn.Insert("job_version", version); err != nil {
		return fmt.Errorf("job version insert failed: %v", err)
	}
	return nil
}
450950
func (engine *OrcEngine) initOperationWorker() {
	tick := time.Tick(time.Duration(RefreshInterval) * time.Second)
	portsTick := time.Tick(5 * time.Minute)
	for {
		select {
		case op := <-engine.opsChan:
			op.Do(engine)
		case <-engine.refreshAllChan:
			engine.refreshAllPodGroups()
		case <-tick:
			engine.refreshAllPodGroups()
		case <-portsTick:
			RefreshPorts(engine.pgCtrls)
		case <-engine.stop:
			return
		}
	}
}
158675
func (m *ModelStatus) FullUnitWorkloadVersion(unitName string) (status.StatusInfo, error) {
	return m.getStatus(globalWorkloadVersionKey(unitName), "workload")
}
1288033
func (v VersionMiddleware) WrapHandler(handler func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error) func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
	return func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
		w.Header().Set("Server", fmt.Sprintf("Docker/%s (%s)", v.serverVersion, runtime.GOOS))
		w.Header().Set("API-Version", v.defaultVersion)
		w.Header().Set("OSType", runtime.GOOS)

		apiVersion := vars["version"]
		if apiVersion == "" {
			apiVersion = v.defaultVersion
		}
		if versions.LessThan(apiVersion, v.minVersion) {
			return versionUnsupportedError{version: apiVersion, minVersion: v.minVersion}
		}
		if versions.GreaterThan(apiVersion, v.defaultVersion) {
			return versionUnsupportedError{version: apiVersion, maxVersion: v.defaultVersion}
		}
		ctx = context.WithValue(ctx, httputils.APIVersionKey{}, apiVersion)
		return handler(ctx, w, r, vars)
	}

}
109722
func Version() int {
	var v C.int
	if err := result(C.cuDriverGetVersion(&v)); err != nil {
		return -1
	}
	return int(v)
}
1101775
func (c *Client) workHandler() {
	for {
		select {
		case w := <-c.work:
			c.process(w)
		case <-time.After(c.keepAlive):
			c.process(keepAliveData)
		case <-c.disconnect:
			return
		}
	}
}
1162328
func (task *TCPListenerTask) StopErr(err error) {
	task.LoopTask.StopErrFunc(func() error {
		task.stop()
		return err
	})
}
1124022
func VersionChange(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "versionchange", Listener: listener}
}
1162320
func (c *Connection) VersionDisable(current string) error {
	h := Headers{"X-Versions-Location": ""}
	if err := c.ContainerUpdate(current, h); err != nil {
		return err
	}
	return nil
}
388303
func NewUserDeactivationWorker(ctx context.Context, app application.Application) UserDeactivationWorker {
	w := &userDeactivationWorker{
		worker.Worker{
			Ctx:   ctx,
			App:   app,
			Owner: worker.GetLockOwner(ctx),
			Name:  "user-deactivation",
		},
	}
	w.Do = w.deactivateUsers
	return w
}
757867
func (s *SetDefaultPolicyVersionInput) SetVersionId(v string) *SetDefaultPolicyVersionInput {
	s.VersionId = &v
	return s
}
71886
func (remote *RemoteDebugger) StopProfiler() (p Profile, err error) {
	res, err := remote.sendRawReplyRequest("Profiler.stop", nil)
	if err != nil {
		return p, err
	}
	var response map[string]json.RawMessage
	err = json.Unmarshal(res, &response)
	if err != nil {
		return p, err
	}
	err = json.Unmarshal(response["profile"], &p)
	return p, err
}
1305907
func (p *provisioner) saveApplicationWorker(appName string, aw *applicationWorker) {
	p.mu.Lock()
	defer p.mu.Unlock()

	if p.appWorkers == nil {
		p.appWorkers = make(map[string]*applicationWorker)
	}
	p.appWorkers[appName] = aw
}