// Starting at position 1 drill into the object
168227
func (s Session) getNestedProperty(keys []string, newValue interface{}) (result interface{}, err error) {
	for x := 1; x < len(keys); x++ {
		newValue, err = s.GetProperty(keys[x], newValue)
		if err != nil || newValue == nil {
			return newValue, err
		}
	}
	return newValue, nil
}
116712
func (c *container) Start(targeted bool) {
	adHoc := false
	detachFlag := false
	if c.Exists() {
		if !c.Running() {
			c.startAcceleratedMounts()
			fmt.Fprintf(c.CommandsOut(), "Starting container %s ...\n", c.ActualName(adHoc))
			c.start(adHoc, targeted, detachFlag)
		}
	} else {
		c.Run([]string{}, targeted, detachFlag)
	}
}
308765
func (dr *delRange) start() {
	if !dr.storeSupport {
		dr.wait.Add(1)
		go dr.startEmulator()
	}
}
979487
func (mt MongoTail) Start(dbSession *DbSession) {
	// nil options get initialized to gtm.DefaultOptions()
	bd := time.Duration(750) * time.Millisecond
	options := &gtm.Options{
		After:               nil,        // if nil defaults to LastOpTimestamp
		Filter:              nil,        // only receive inserts in this collection
		OpLogDatabaseName:   nil,        // defaults to "local"
		OpLogCollectionName: nil,        // defaults to a collection prefixed "oplog."
		CursorTimeout:       nil,        // defaults to 100s
		ChannelSize:         20,         // defaults to 20
		BufferSize:          20,         // defaults to 50. used to batch fetch documents on bursts of activity
		BufferDuration:      bd,         // defaults to 750 ms. after this timeout the batch is force fetched
		WorkerCount:         5,          // defaults to 1. number of go routines batch fetching concurrently
		Ordering:            gtm.Oplog,  // defaults to gtm.Oplog. ordering guarantee of events on the output channel
		UpdateDataAsDelta:   false,      // set to true to only receive delta information in the Data field on updates (info straight from oplog)
		DirectReadNs:        []string{}, // set to a slice of namespaces to read data directly from bypassing the oplog
		DirectReadFilter:    nil,
	}
	ctx := gtm.Start(dbSession.Session, options)
	// ctx.OpC is a channel to read ops from
	// ctx.ErrC is a channel to read errors from
	// ctx.Stop() stops all go routines started by gtm.Start
	go func() {
		ctx.DirectReadWg.Wait()
		fmt.Println("[GMGO] imported all the collections")
	}()

	mt.listen(ctx)
}
596258
func (c *command) Start() error {
	cmd := endpointToCommand(c.command, c.endpoint)

	e := pktline.NewEncoder(c.conn)
	return e.Encode([]byte(cmd))
}
393226
func (l *Lookout) Start() error {
	if !atomic.CompareAndSwapInt32(&l.started, 0, 1) {
		return nil
	}

	log.Infof("Starting lookout")

	startEpoch, err := l.cfg.DB.GetLookoutTip()
	if err != nil {
		return err
	}

	if startEpoch == nil {
		log.Infof("Starting lookout from chain tip")
	} else {
		log.Infof("Starting lookout from epoch(height=%d hash=%x)",
			startEpoch.Height, startEpoch.Hash)
	}

	events, err := l.cfg.EpochRegistrar.RegisterBlockEpochNtfn(startEpoch)
	if err != nil {
		log.Errorf("Unable to register for block epochs: %v", err)
		return err
	}

	l.wg.Add(1)
	go l.watchBlocks(events)

	log.Infof("Lookout started successfully")

	return nil
}
914400
func ProjectStart(p project.APIProject, c *cli.Context) error {
	err := p.Start(context.Background(), c.Args()...)
	if err != nil {
		return cli.NewExitError(err.Error(), 1)
	}
	return nil
}
833271
func (uow *UnitOfWork) Start() {
	uow.prepareRequirements()
	for _, container := range uow.Containers() {
		if includes(uow.targeted, container.Name()) {
			container.Start(true)
		} else if includes(uow.requireStarted, container.Name()) || !container.Exists() {
			container.Start(false)
		}
	}
}
306381
func (p *Project) Start(image string) (types.ContainerJSON, error) {
	return p.StartWithConfig(image, ContainerConfig{})
}
198449
func (d *MCP3004Driver) Start() (err error) {
	bus := d.GetBusOrDefault(d.connector.GetSpiDefaultBus())
	chip := d.GetChipOrDefault(d.connector.GetSpiDefaultChip())
	mode := d.GetModeOrDefault(d.connector.GetSpiDefaultMode())
	bits := d.GetBitsOrDefault(d.connector.GetSpiDefaultBits())
	maxSpeed := d.GetSpeedOrDefault(d.connector.GetSpiDefaultMaxSpeed())

	d.connection, err = d.connector.GetSpiConnection(bus, chip, mode, bits, maxSpeed)
	if err != nil {
		return err
	}
	return nil
}
183155
func (s *IncrementStat) Start() {
	s.m.Lock()
	defer s.m.Unlock()
	s.c = 0
	s.isStarted = true
}
1312229
func (a *AIP1640Driver) Start() (err error) {
	a.pinData.On()
	a.pinClock.On()

	return
}
552712
func (s *fsResourceAnalyzer) Start() {
	s.startOnce.Do(func() {
		if s.calcPeriod <= 0 {
			klog.Info("Volume stats collection disabled.")
			return
		}
		klog.Info("Starting FS ResourceAnalyzer")
		go wait.Forever(func() { s.updateCachedPodVolumeStats() }, s.calcPeriod)
	})
}
762744
func Start(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) {
	dargs := []string{"-e", "-D"}

	sshd := exec.Command("/usr/sbin/sshd", dargs...)
	sshd.Stdout = os.Stdout
	sshd.Stderr = os.Stderr

	if err := sshd.Start(); err != nil {
		return 0, err
	}

	return sshd.Process.Pid, nil
}
516642
func (s *SigPool) Start() error {
	if !atomic.CompareAndSwapUint32(&s.started, 0, 1) {
		return nil
	}

	for i := 0; i < s.numWorkers; i++ {
		s.wg.Add(1)
		go s.poolWorker()
	}

	return nil
}
879920
func (c *cache) start(a *Allocator) waitChan {
	listDone := make(waitChan)

	c.mutex.Lock()

	// start with a fresh nextCache
	c.nextCache = idMap{}
	c.nextKeyCache = keyMap{}
	c.mutex.Unlock()

	c.stopWatchWg.Add(1)

	go func() {
		<-c.backend.Connected()
		logger := c.getLogger()
		logger.Info("Starting to watch allocation changes")

		watcher := c.backend.ListAndWatch(c.prefix, c.prefix, 512)

		for {
			select {
			case event, ok := <-watcher.Events:
				if !ok {
					goto abort
				}
				if event.Typ == kvstore.EventTypeListDone {
					c.mutex.Lock()
					// nextCache is valid, point the live cache to it
					c.cache = c.nextCache
					c.keyCache = c.nextKeyCache
					c.mutex.Unlock()

					// report that the list operation has
					// been completed and the allocator is
					// ready to use
					close(listDone)
					continue
				}

				id := c.keyToID(event.Key, c.deleteInvalidPrefixes)
				if id != 0 {
					c.mutex.Lock()

					var key AllocatorKey

					if len(event.Value) > 0 {
						var err error
						key, err = a.keyType.PutKey(string(event.Value))
						if err != nil {
							c.getLogger().WithError(err).WithField(fieldKey, event.Value).
								Warning("Unable to unmarshal allocator key")
						}
					}
					debugFields := c.getLogger().WithFields(logrus.Fields{fieldKey: key, fieldID: id})

					switch event.Typ {
					case kvstore.EventTypeCreate:
						kvstore.Trace("Adding id to cache", nil, debugFields.Data)
						c.nextCache[id] = key
						if key != nil {
							c.nextKeyCache[key.GetKey()] = id
						}
						a.idPool.Remove(id)

					case kvstore.EventTypeModify:
						kvstore.Trace("Modifying id in cache", nil, debugFields.Data)
						if k, ok := c.nextCache[id]; ok {
							delete(c.nextKeyCache, k.GetKey())
						}

						c.nextCache[id] = key
						if key != nil {
							c.nextKeyCache[key.GetKey()] = id
						}

					case kvstore.EventTypeDelete:
						kvstore.Trace("Removing id from cache", nil, debugFields.Data)

						if a.enableMasterKeyProtection {
							if value := a.localKeys.lookupID(id); value != "" {
								a.recreateMasterKey(id, value, true)
								break
							}
						}

						if k, ok := c.nextCache[id]; ok && k != nil {
							delete(c.nextKeyCache, k.GetKey())
						}

						delete(c.nextCache, id)
						a.idPool.Insert(id)
					}
					c.mutex.Unlock()

					if a.events != nil {
						a.events <- AllocatorEvent{
							Typ: event.Typ,
							ID:  idpool.ID(id),
							Key: key,
						}
					}
				}

			case <-c.stopChan:
				goto abort
			}
		}

	abort:
		watcher.Stop()
		// Signal that watcher is done
		c.stopWatchWg.Done()
	}()

	return listDone
}
387848
func (i *INA3221Driver) Start() error {
	var err error
	bus := i.GetBusOrDefault(i.connector.GetDefaultBus())
	address := i.GetAddressOrDefault(int(ina3221Address))

	if i.connection, err = i.connector.GetConnection(address, bus); err != nil {
		return err
	}

	if err := i.initialize(); err != nil {
		return err
	}

	return nil
}