// Modulate applies all modulators from this producer to a given message.
// This implementation handles routing and discarding of messages.
503226
func (prod *SimpleProducer) Modulate(msg *Message) ModulateResult {
	if len(prod.modulators) > 0 {
		msg.FreezeOriginal()
		return prod.modulators.Modulate(msg)
	}
	return ModulateResultContinue
}
1353981
func (a *Adaptor) On(event string, f func(msg Message)) bool {
	if a.client == nil {
		return false
	}
	a.client.Subscribe(event, func(msg *nats.Msg) {
		f(msg)
	})

	return true
}
60517
func (filterModulator *FilterModulator) Modulate(msg *Message) ModulateResult {
	result, err := filterModulator.ApplyFilter(msg)
	if err != nil {
		logrus.Warning("FilterModulator with error:", err)
	}

	if result == FilterResultMessageAccept {
		return ModulateResultContinue
	}

	newStreamID := result.GetStreamID()
	if newStreamID == InvalidStreamID {
		return ModulateResultDiscard
	}

	msg.SetStreamID(newStreamID)
	return ModulateResultFallback
}
1074056
func (u *Ugen) Modulo(val Input) Input {
	return binOpModulo(u.Rate, u, val, u.NumOutputs)
}
1019132
func (a *DispatchTouchEventArgs) SetModifiers(modifiers int) *DispatchTouchEventArgs {
	a.Modifiers = &modifiers
	return a
}
980218
func Modadd(a, b, m *FP256BN.BIG) *FP256BN.BIG {
	c := a.Plus(b)
	c.Mod(m)
	return c
}
874496
func (f *RaceFreeFakeWatcher) Modify(obj runtime.Object) {
	f.Lock()
	defer f.Unlock()
	if !f.Stopped {
		select {
		case f.result <- Event{Modified, obj}:
			return
		default:
			panic(fmt.Errorf("channel full"))
		}
	}
}
557792
func (m *Messenger) Send(to Recipient, message string, messagingType MessagingType, tags ...string) error {
	return m.SendWithReplies(to, message, nil, messagingType, tags...)
}
981199
func (m *SetMode) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.CUSTOM_MODE)
	binary.Read(data, binary.LittleEndian, &m.TARGET_SYSTEM)
	binary.Read(data, binary.LittleEndian, &m.BASE_MODE)
}
947073
func (f *Pub) Send(b interface{}) {
	// if b == nil { return }
	f.wg.Add(1)
	defer f.wg.Done()
	f.op(f, nil, b)
}
1351241
func (e *FileEvent) IsModify() bool {
	return ((e.mask&sys_IN_MODIFY) == sys_IN_MODIFY || (e.mask&sys_IN_ATTRIB) == sys_IN_ATTRIB)
}
1313485
func (container *container) Modify(config *ResourceModificationRequestResponse) error {
	return convertSystemError(container.system.Modify(config), container)
}
950993
func (c *Transport) Send(ctx context.Context, messageParts ...[]byte) (<-chan Message, error) {
	conn, err := c.getConnection(ctx)
	if err != nil {
		return nil, driver.WithStack(err)
	}
	result, err := conn.Send(ctx, messageParts...)
	if err != nil {
		return nil, driver.WithStack(err)
	}
	return result, nil
}
1173101
func (s *Cluster) SetModifyStatus(v string) *Cluster {
	s.ModifyStatus = &v
	return s
}
648216
func (m *IncomingMessage) SetEditAction(handlerFunc interface{}, args ...interface{}) *IncomingMessage {
	m.Message.SetEditAction(handlerFunc, args...)

	return m
}
748101
func (dns *dnsControl) updateModifed() {
	unix := time.Now().Unix()
	atomic.StoreInt64(&dns.modified, unix)
}
1212266
func (c *Call) Transport() string {
	if c == nil {
		return ""
	}
	return c.ic.req.Transport
}