// TriggerStart asynchronously starts the unit identified by the given name.
// This function does not block for the underlying unit to actually start.
6701
func (m *systemdUnitManager) TriggerStart(name string) error {
	jobID, err := m.systemd.StartUnit(name, "replace", nil)
	if err != nil {
		log.Errorf("Failed to trigger systemd unit %s start: %v", name, err)
		return err
	}
	log.Infof("Triggered systemd unit %s start: job=%d", name, jobID)
	return nil
}
926937
func (s *PollForActivityTaskOutput) SetStartedEventId(v int64) *PollForActivityTaskOutput {
	s.StartedEventId = &v
	return s
}
984996
func trigger(phase string, stack []plugin.Plugin, ctx *c.Context) *c.Context {
	var wg sync.WaitGroup
	wg.Add(1)

	// Finisher function
	done := func(_ctx *c.Context) {
		ctx = _ctx
		wg.Done()
	}

	i := len(stack)
	if i == 0 {
		wg.Done()
		return ctx
	}

	next := done
	for i > 0 {
		i--
		next = nextHandler(phase, stack[i], next, done)
	}

	// Exposes current middleware phase via context
	ctx.Set("$phase", phase)

	// Triggers the middleware call chain
	next(ctx)

	wg.Wait()
	return ctx
}
351271
func SoundStart(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "soundstart", Listener: listener}
}
430923
func (c *ContextAction) TriggerChannel(channel *Channel) {
	packet := MumbleProto.ContextAction{
		ChannelId: &channel.ID,
		Action:    &c.Name,
	}
	c.client.Conn.WriteProto(&packet)
}
72320
func (s *ListAttacksInput) SetStartTime(v *TimeRange) *ListAttacksInput {
	s.StartTime = v
	return s
}
317266
func (s *DateFilter) SetStart(v string) *DateFilter {
	s.Start = &v
	return s
}
143834
func (EventReceiver) SpanStart(ctx context.Context, eventName, query string) context.Context {
	span, ctx := ot.StartSpanFromContext(ctx, eventName)
	otext.DBStatement.Set(span, query)
	otext.DBType.Set(span, "sql")
	return ctx
}
246508
func (c *MConnection) OnStart() error {
	if err := c.BaseService.OnStart(); err != nil {
		return err
	}
	c.flushTimer = cmn.NewThrottleTimer("flush", c.config.FlushThrottle)
	c.pingTimer = time.NewTicker(c.config.PingInterval)
	c.pongTimeoutCh = make(chan bool, 1)
	c.chStatsTimer = time.NewTicker(updateStats)
	c.quitSendRoutine = make(chan struct{})
	c.doneSendRoutine = make(chan struct{})
	go c.sendRoutine()
	go c.recvRoutine()
	return nil
}
106171
func (w *Writer) SetStart(contentId string) error {
	cid, err := formatContentId(contentId)
	if err != nil {
		return err
	}

	w.start = cid
	return nil
}
716996
func (s *TypedAttributeValueRange) SetStartValue(v *TypedAttributeValue) *TypedAttributeValueRange {
	s.StartValue = v
	return s
}
1137633
func (d *bucketDataSource) workerStart(server string, workerCh chan []uint16, tlsConfig *tls.Config) {
	backoffFactor := d.options.DataManagerBackoffFactor
	if backoffFactor <= 0.0 {
		backoffFactor = DefaultBucketDataSourceOptions.DataManagerBackoffFactor
	}
	sleepInitMS := d.options.DataManagerSleepInitMS
	if sleepInitMS <= 0 {
		sleepInitMS = DefaultBucketDataSourceOptions.DataManagerSleepInitMS
	}
	sleepMaxMS := d.options.DataManagerSleepMaxMS
	if sleepMaxMS <= 0 {
		sleepMaxMS = DefaultBucketDataSourceOptions.DataManagerSleepMaxMS
	}

	// Use exponential backoff loop to handle connect retries to the server.
	go func() {
		atomic.AddUint64(&d.stats.TotWorkerStart, 1)

		ExponentialBackoffLoop("cbdatasource.worker-"+server,
			func() int { return d.worker(server, workerCh, tlsConfig) },
			sleepInitMS, backoffFactor, sleepMaxMS)

		atomic.AddUint64(&d.stats.TotWorkerDone, 1)
	}()
}
796281
func (s *LambdaFunctionFailedEventAttributes) SetStartedEventId(v int64) *LambdaFunctionFailedEventAttributes {
	s.StartedEventId = &v
	return s
}
177394
func (setup *SetupServerController) handlePairStart(in util.Container) (util.Container, error) {
	out := util.NewTLV8Container()
	setup.step = PairStepStartResponse

	out.SetByte(TagSequence, setup.step.Byte())
	out.SetBytes(TagPublicKey, setup.session.PublicKey)
	out.SetBytes(TagSalt, setup.session.Salt)

	log.Debug.Println("<-     B:", hex.EncodeToString(out.GetBytes(TagPublicKey)))
	log.Debug.Println("<-     s:", hex.EncodeToString(out.GetBytes(TagSalt)))

	return out, nil
}
1252267
func (l *StructLogger) CaptureStart(from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) error {
	return nil
}
451093
func (is *IndexerService) OnStart() error {
	// Use SubscribeUnbuffered here to ensure both subscriptions does not get
	// cancelled due to not pulling messages fast enough. Cause this might
	// sometimes happen when there are no other subscribers.

	blockHeadersSub, err := is.eventBus.SubscribeUnbuffered(context.Background(), subscriber, types.EventQueryNewBlockHeader)
	if err != nil {
		return err
	}

	txsSub, err := is.eventBus.SubscribeUnbuffered(context.Background(), subscriber, types.EventQueryTx)
	if err != nil {
		return err
	}

	go func() {
		for {
			msg := <-blockHeadersSub.Out()
			header := msg.Data().(types.EventDataNewBlockHeader).Header
			batch := NewBatch(header.NumTxs)
			for i := int64(0); i < header.NumTxs; i++ {
				msg2 := <-txsSub.Out()
				txResult := msg2.Data().(types.EventDataTx).TxResult
				if err = batch.Add(&txResult); err != nil {
					is.Logger.Error("Can't add tx to batch",
						"height", header.Height,
						"index", txResult.Index,
						"err", err)
				}
			}
			if err = is.idr.AddBatch(batch); err != nil {
				is.Logger.Error("Failed to index block", "height", header.Height, "err", err)
			} else {
				is.Logger.Info("Indexed block", "height", header.Height)
			}
		}
	}()
	return nil
}
967611
func (owl *OngoingWorkLimiter) WaitToStart(ctx context.Context) error {
	select {
	case owl.permits <- struct{}{}:
		return nil
	case <-ctx.Done():
		return ctx.Err()
	}
}