// Start writes initialization bytes to sensor
763781
func (h *MPU6050Driver) Start() (err error) {
	if err := h.initialize(); err != nil {
		return err
	}

	return
}
775779
func (s *OsdCsiServer) Start() error {
	return s.GrpcServer.Start(func(grpcServer *grpc.Server) {
		csi.RegisterIdentityServer(grpcServer, s)
		csi.RegisterControllerServer(grpcServer, s)
		csi.RegisterNodeServer(grpcServer, s)
	})
}
1236823
func (s *Service) Start() error {
	server := http.Server{
		Handler: s,
	}

	var ln net.Listener
	var err error
	if s.CertFile == "" || s.KeyFile == "" {
		ln, err = net.Listen("tcp", s.addr)
		if err != nil {
			return err
		}
	} else {
		config, err := createTLSConfig(s.CertFile, s.KeyFile)
		if err != nil {
			return err
		}
		ln, err = tls.Listen("tcp", s.addr, config)
		if err != nil {
			return err
		}
		s.logger.Printf("secure HTTPS server enabled with cert %s, key %s", s.CertFile, s.KeyFile)
	}
	s.ln = ln

	go func() {
		err := server.Serve(s.ln)
		if err != nil {
			s.logger.Println("HTTP service Serve() returned:", err.Error())
		}
	}()
	s.logger.Println("service listening on", s.addr)

	return nil
}
848245
func (p *Probe) Start(interval time.Duration) {
	p.Lock()
	p.interval = interval
	p.max = interval * multiplier
	p.Unlock()
}
203061
func (s *BufferedSender) Start() {
	// write lock to start running
	s.runmx.Lock()
	defer s.runmx.Unlock()
	if s.running {
		return
	}

	s.running = true
	s.bufs = make(chan *bytes.Buffer, 32)
	go s.run()
}
28776
func Start(config *config.Config, handler http.Handler) {
	mu.Lock()
	defer mu.Unlock()

	cfg = config
	port := config.Choria.StatsPort

	if port == 0 {
		log.Infof("Statistics gathering disabled, set plugin.choria.stats_port")
		return
	}

	prometheus.MustRegister(buildInfo)
	buildInfo.WithLabelValues(build.Version, build.SHA).Inc()

	if !running {
		log.Infof("Starting statistic reporting Prometheus statistics on http://%s:%d/choria/", config.Choria.StatsListenAddress, port)

		if handler == nil {
			http.HandleFunc("/choria/", handleRoot)
			http.Handle("/choria/prometheus", promhttp.Handler())

			go http.ListenAndServe(fmt.Sprintf("%s:%d", config.Choria.StatsListenAddress, port), nil)
		} else {
			hh := handler.(*http.ServeMux)
			hh.HandleFunc("/choria/", handleRoot)
			hh.Handle("/choria/prometheus", promhttp.Handler())
		}

		running = true
	}
}
157642
func (o *Once) Start(f func() error) error {
	if o.state.CAS(int32(Idle), int32(Starting)) {
		var err error
		if f != nil {
			err = f()
		}

		// skip forward to error state
		if err != nil {
			o.setError(err)
			o.state.Store(int32(Errored))
			close(o.stoppingCh)
			close(o.stopCh)
		} else {
			o.state.Store(int32(Running))
		}
		close(o.startCh)

		return err
	}

	<-o.startCh
	return o.loadError()
}
353722
func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.StartResponse, error) {
	return nil, errdefs.ErrNotImplemented
}
209312
func (c *CameraDriver) Start() (err error) {
	if err := c.start(c); err != nil {
		return err
	}
	img := gocv.NewMat()
	go func() {
		for {
			if ok := c.camera.Read(&img); ok {
				c.Publish(Frame, img)
			}
		}
	}()
	return
}
490810
func (ls *LightStepSpanSink) Start(cl *trace.Client) error {
	ls.traceClient = cl
	return nil
}
465718
func (d *TMP006) Start() error {
	if err := d.setup(); err != nil {
		return err
	}

	d.rawDieTemps = make(chan float64)
	d.objTemps = make(chan float64)

	go func() {
		var rawDieTemp, objTemp float64
		var rdtAvlb, otAvlb bool
		var err error
		var timer <-chan time.Time
		resetTimer := func() {
			timer = time.After(time.Duration(d.SampleRate.timeRequired*1000) * time.Millisecond)
		}
		resetTimer()

		for {
			var rawDieTemps, objTemps chan float64

			if rdtAvlb {
				rawDieTemps = d.rawDieTemps
			}
			if otAvlb {
				objTemps = d.objTemps
			}

			select {
			case <-timer:
				var rdt float64
				if rdt, err = d.measureRawDieTemp(); err != nil {
					glog.Errorf("tmp006: %v", err)
				} else {
					rawDieTemp = rdt
					rdtAvlb = true
				}
				var ot float64
				if ot, err = d.measureObjTemp(); err != nil {
					glog.Errorf("tmp006: %v", err)
				} else {
					objTemp = ot
					otAvlb = true
				}
				resetTimer()
			case rawDieTemps <- rawDieTemp:
				rdtAvlb = false
			case objTemps <- objTemp:
				otAvlb = false
			case waitc := <-d.closing:
				waitc <- struct{}{}
				close(d.rawDieTemps)
				close(d.objTemps)
				return
			}
		}
	}()

	return nil
}
333161
func (d *Devices) Start() (err error) {
	log.Println("Starting devices...")
	for _, device := range *d {
		info := "Starting device " + device.Name()

		if pinner, ok := device.(Pinner); ok {
			info = info + " on pin " + pinner.Pin()
		}

		log.Println(info + "...")
		if derr := device.Start(); derr != nil {
			err = multierror.Append(err, derr)
		}
	}
	return err
}
975716
func (vm *VM) Start() error {
	if vm.MockStart != nil {
		return vm.MockStart()
	}
	return lvm.ErrNotImplemented
}
447068
func (processor *processor) Start() error {
	var errs qor.Errors
	processor.Initialize()
	if errs.AddError(processor.Validate()); !errs.HasError() {
		errs.AddError(processor.Commit())
	}
	if errs.HasError() {
		return errs
	}
	return nil
}
637224
func (p *Prometheus) Start(a telegraf.Accumulator) error {
	if p.MonitorPods {
		var ctx context.Context
		ctx, p.cancel = context.WithCancel(context.Background())
		return p.start(ctx)
	}
	return nil
}
1264820
func (s *SSD1306Driver) Start() (err error) {
	bus := s.GetBusOrDefault(s.connector.GetSpiDefaultBus())
	chip := s.GetChipOrDefault(s.connector.GetSpiDefaultChip())
	mode := s.GetModeOrDefault(s.connector.GetSpiDefaultMode())
	bits := s.GetBitsOrDefault(s.connector.GetSpiDefaultBits())
	maxSpeed := s.GetSpeedOrDefault(s.connector.GetSpiDefaultMaxSpeed())

	s.connection, err = s.connector.GetSpiConnection(bus, chip, mode, bits, maxSpeed)
	if err != nil {
		return err
	}
	s.ssd1306Init()
	return
}
1244767
func (m *Manager) Start() error {
	if !atomic.CompareAndSwapUint32(&m.started, 0, 1) {
		return nil
	}

	return nil
}