// Start attempts to start a mist authenticator from the list of available
// authenticators; the authenticator provided is in the uri string format
// (scheme:[//[user:pass@]host[:port]][/]path[?query][#fragment])
768227
func Start(uri string) error {

	// no authenticator is wanted
	if uri == "" {
		isConfigured = false
		return nil
	}

	// parse the uri string into a url object
	url, err := url.Parse(uri)
	if err != nil {
		return err
	}

	// check to see if the scheme is supported; if not, indicate as such and continue
	authTex.Lock()
	auth, ok := authenticators[url.Scheme]
	authTex.Unlock()
	if !ok {
		return fmt.Errorf("Unsupported scheme '%s'", url.Scheme)
	}

	// set defaultAuth by attempting to start the desired authenticator
	defaultAuth, err = auth(url)
	if err != nil {
		return err
	}
	isConfigured = true

	return nil
}
683491
func (starter *starter) Start() (err error) {
	for {
		if err = starter.server.Handle(); err != nil {
			return err
		}
		starter.c = make(chan os.Signal, 1)
		signal.Notify(starter.c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL)
		s := <-starter.c
		starter.server.Close()
		switch s {
		case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL:
			signal.Stop(starter.c)
			return
		}
	}
}
1142296
func (w *WebAPIFeeEstimator) Start() error {
	var err error
	w.started.Do(func() {
		walletLog.Infof("Starting web API fee estimator")

		w.updateFeeTicker = time.NewTicker(w.randomFeeUpdateTimeout())
		w.updateFeeEstimates()

		w.wg.Add(1)
		go w.feeUpdateManager()

	})
	return err
}
492929
func Start(ctx context.Context, factory service.ClusterCacheFactory, options ...rest.HTTPClientOption) (bool, error) {
	if atomic.LoadUint32(&started) == 0 {
		// Has not started yet.
		startLock.Lock()
		defer startLock.Unlock()
		if started == 0 {
			clusterCache = factory.NewClusterCache(ctx, options...)
			err := clusterCache.Start(ctx)
			if err == nil {
				// Success
				atomic.StoreUint32(&started, 1)
			} else {
				clusterCache = nil
			}
			return clusterCache != nil && started == uint32(1), err
		}
	}
	return clusterCache != nil && started == uint32(1), nil
}
378517
func (e *Echo) Start(address string) error {
	e.Server.Addr = address
	return e.StartServer(e.Server)
}
859815
func (t *transacter) Start() error {
	t.stopped = false

	rand.Seed(time.Now().Unix())

	for i := 0; i < t.Connections; i++ {
		c, _, err := connect(t.Target)
		if err != nil {
			return err
		}
		t.conns[i] = c
	}

	t.startingWg.Add(t.Connections)
	t.endingWg.Add(2 * t.Connections)
	for i := 0; i < t.Connections; i++ {
		go t.sendLoop(i)
		go t.receiveLoop(i)
	}

	t.startingWg.Wait()

	return nil
}
1274377
func (s *Server) Start() {

	http.HandleFunc("/", index)
	http.Handle("/stats/app", &statsHandler{
		stats:  s.Stats,
		logger: s.Logger,
	})
	http.HandleFunc("/stats/runtime", stats_api.Handler)

	port := DefaultPort
	if p := os.Getenv(EnvPort); p != "" {
		port = p
	}

	s.Logger.Printf("[INFO] Start server listening on :%s", port)
	if err := http.ListenAndServe(":"+port, nil); err != nil {
		s.Logger.Printf("[ERROR] Failed to start varz-server: %s", err)
	}
}
33968
func (b *Driver) Start() (err error) {
	b.adaptor().WithoutResponses(true)
	b.Init()
	b.FlatTrim()
	b.StartPcmd()
	b.FlatTrim()

	return
}
125374
func (s *dockerLoggerServer) Start(ctx context.Context, req *proto.StartRequest) (*proto.StartResponse, error) {
	opts := &StartOpts{
		Endpoint:    req.Endpoint,
		ContainerID: req.ContainerId,
		Stdout:      req.StdoutFifo,
		Stderr:      req.StderrFifo,
		TTY:         req.Tty,

		TLSCert: req.TlsCert,
		TLSKey:  req.TlsKey,
		TLSCA:   req.TlsCa,
	}
	err := s.impl.Start(opts)
	if err != nil {
		return nil, err
	}
	resp := &proto.StartResponse{}
	return resp, nil
}
152144
func (d *Driver) Start() (err error) {
	tc, terr := net.Dial("tcp", d.tcpaddress)
	if terr != nil {
		return terr
	}
	uc, uerr := net.Dial("udp4", d.udpaddress)
	if uerr != nil {
		return uerr
	}

	d.udpconn = uc
	d.tcpconn = tc

	return
}
229467
func (vm *VM) Start() error {
	s, err := vm.getService()
	if err != nil {
		return err
	}

	return s.start()
}
478628
func (s *sdkGrpcServer) Start() error {

	// Setup https if certs have been provided
	opts := make([]grpc.ServerOption, 0)
	if s.config.Net != "unix" && s.config.Security.Tls != nil {
		creds, err := credentials.NewServerTLSFromFile(
			s.config.Security.Tls.CertFile,
			s.config.Security.Tls.KeyFile)
		if err != nil {
			return fmt.Errorf("Failed to create credentials from cert files: %v", err)
		}
		opts = append(opts, grpc.Creds(creds))
		s.log.Info("SDK TLS enabled")
	} else {
		s.log.Info("SDK TLS disabled")
	}

	// Setup authentication and authorization using interceptors if auth is enabled
	if len(s.config.Security.Authenticators) != 0 {
		opts = append(opts, grpc.UnaryInterceptor(
			grpc_middleware.ChainUnaryServer(
				s.rwlockIntercepter,
				grpc_auth.UnaryServerInterceptor(s.auth),
				s.authorizationServerInterceptor,
				s.loggerServerInterceptor,
			)))
	} else {
		opts = append(opts, grpc.UnaryInterceptor(
			grpc_middleware.ChainUnaryServer(
				s.rwlockIntercepter,
				s.loggerServerInterceptor,
			)))
	}

	// Start the gRPC Server
	err := s.GrpcServer.StartWithServer(func() *grpc.Server {
		grpcServer := grpc.NewServer(opts...)

		api.RegisterOpenStorageClusterServer(grpcServer, s.clusterServer)
		api.RegisterOpenStorageNodeServer(grpcServer, s.nodeServer)
		api.RegisterOpenStorageObjectstoreServer(grpcServer, s.objectstoreServer)
		api.RegisterOpenStorageSchedulePolicyServer(grpcServer, s.schedulePolicyServer)
		api.RegisterOpenStorageIdentityServer(grpcServer, s.identityServer)
		api.RegisterOpenStorageVolumeServer(grpcServer, s.volumeServer)
		api.RegisterOpenStorageMigrateServer(grpcServer, s.volumeServer)
		api.RegisterOpenStorageCredentialsServer(grpcServer, s.credentialServer)
		api.RegisterOpenStorageCloudBackupServer(grpcServer, s.cloudBackupServer)
		api.RegisterOpenStorageMountAttachServer(grpcServer, s.volumeServer)
		api.RegisterOpenStorageAlertsServer(grpcServer, s.alertsServer)
		api.RegisterOpenStorageClusterPairServer(grpcServer, s.clusterPairServer)
		api.RegisterOpenStoragePolicyServer(grpcServer, s.policyServer)
		api.RegisterOpenStorageClusterDomainsServer(grpcServer, s.clusterDomainsServer)

		if s.config.Security.Role != nil {
			api.RegisterOpenStorageRoleServer(grpcServer, s.roleServer)
		}

		s.RegisterServerExtensions(grpcServer)

		return grpcServer
	})
	if err != nil {
		return err
	}

	return nil
}
1189545
func (d *AuthenticatedGossiper) Start() error {
	if !atomic.CompareAndSwapUint32(&d.started, 0, 1) {
		return nil
	}

	log.Info("Authenticated Gossiper is starting")

	// First we register for new notifications of newly discovered blocks.
	// We do this immediately so we'll later be able to consume any/all
	// blocks which were discovered.
	blockEpochs, err := d.cfg.Notifier.RegisterBlockEpochNtfn(nil)
	if err != nil {
		return err
	}
	d.blockEpochs = blockEpochs

	height, err := d.cfg.Router.CurrentBlockHeight()
	if err != nil {
		return err
	}
	d.bestHeight = height

	// Start the reliable sender. In case we had any pending messages ready
	// to be sent when the gossiper was last shut down, we must continue on
	// our quest to deliver them to their respective peers.
	if err := d.reliableSender.Start(); err != nil {
		return err
	}

	d.syncMgr.Start()

	d.wg.Add(1)
	go d.networkHandler()

	return nil
}
1008021
func (router *Router) Start() {
	cfg := router.config
	host := cfg.Host

	if len(cfg.Port) > 0 {
		host += ":" + cfg.Port
	}

	router.httpServer = &http.Server{
		Addr:         host,
		Handler:      router,
		ReadTimeout:  cfg.ReadTimeout,
		WriteTimeout: cfg.WriteTimeout,
	}
	LOGHANDLER.Info("HTTP server, listening on", host)
	err := router.httpServer.ListenAndServe()
	if err != nil && err != http.ErrServerClosed {
		LOGHANDLER.Error("HTTP server exited with error:", err.Error())
	}
}
357342
func (s *Service) Start(ctx context.Context, r *shimapi.StartRequest) (*shimapi.StartResponse, error) {
	p, err := s.getExecProcess(r.ID)
	if err != nil {
		return nil, err
	}
	if err := p.Start(ctx); err != nil {
		return nil, err
	}
	return &shimapi.StartResponse{
		ID:  p.ID(),
		Pid: uint32(p.Pid()),
	}, nil
}
361899
func (s *Server) Start() error {
	if s.config.Listener == nil {
		s.config.DisableHTTP2 = true
		err := s.config.InitListener(func() error {
			if s.config.TLSConfig == nil {
				return nil
			}
			s.config.TLSConfig.PreferServerCipherSuites = true
			return nil
		})
		if err != nil {
			return err
		}
	}
	s.config.Print(`fast`)
	return s.Serve(s.config.Listener)

}
699945
func (fw *FirewallSSO) Start(ctx context.Context, info map[string]string, timeout int) (bool, error) {
	log.LoggerWContext(ctx).Debug("Sending SSO start")
	return true, nil
}