// Emit emits a single entry to a given destination topic.
550991
func (k *KafkaLogEmitter) Emit(logLine *avro.LogLine) {
	if logLine.Logtypeid.(int64) >= logLevels[k.config.LogLevel] {
		k.producer.Send(&producer.ProducerRecord{
			Topic: k.config.Topic,
			Value: logLine,
		})
	}
}
724421
func emit(ctx *rtmCtx, e *Event) error {
	select {
	case <-ctx.Done():
		return ctx.Err()
	case ctx.inbuf <- e:
		return nil
	}
}
157115
func (l *Lexer) emitString(delimiter rune) {
	str := l.input[l.start:l.pos]

	// replace escaped delimiters
	str = strings.Replace(str, "\\"+string(delimiter), string(delimiter), -1)

	l.produce(TokenString, str)
}
633163
func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool {
	emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE)
	return yaml_emitter_emit_node(emitter, event, true, false, false, false)
}
1174486
func (a *AsyncEventEmitter) EmitEvent(event Event) {
	a.listenersLock.RLock()
	for _, listener := range a.listeners {
		go listener.HandleEvent(event)
	}
	a.listenersLock.RUnlock()
}
866713
func (l *Lexer) emit(kind TokenKind) {
	l.produce(kind, l.input[l.start:l.pos])
}
1322879
func (kz *Kazoo) Topic(topic string) *Topic {
	return &Topic{Name: topic, kz: kz}
}
455018
func (tr *TaskRunner) emitStats(ru *cstructs.TaskResourceUsage) {
	if !tr.clientConfig.PublishAllocationMetrics {
		return
	}

	if ru.ResourceUsage.MemoryStats != nil {
		tr.setGaugeForMemory(ru)
	}

	if ru.ResourceUsage.CpuStats != nil {
		tr.setGaugeForCPU(ru)
	}
}
702168
func (a *adapter) Topic(res *hal.Response, strings ...string) error {
	for _ = range strings {
	}
	return nil
}
526776
func (p *Publisher) SubscribeTopic(topic topicFunc) chan interface{} {
	ch := make(chan interface{}, p.buffer)
	p.m.Lock()
	p.subscribers[ch] = topic
	p.m.Unlock()
	return ch
}
1123096
func (conn *DBusFakeConnection) EmitSignal(name, path, iface, signal string, args ...interface{}) {
	sig := &godbus.Signal{
		Sender: name,
		Path:   godbus.ObjectPath(path),
		Name:   iface + "." + signal,
		Body:   args,
	}
	for _, ch := range conn.signalHandlers {
		ch <- sig
	}
}
327094
func (b *redisBroker) Publish(topic string, msg *broker.Message, opts ...broker.PublishOption) error {
	v, err := b.opts.Codec.Marshal(msg)
	if err != nil {
		return err
	}

	conn := b.pool.Get()
	_, err = redis.Int(conn.Do("PUBLISH", topic, v))
	conn.Close()

	return err
}
1189121
func (l *StringLexer) Emit(t ItemType) {
	l.items <- l.Grab(t)
	l.start = l.pos
}
616570
func (self *StreamHandler) Emit2(
	handler Handler, record *LogRecord) error {

	message := handler.Format(record)
	if err := self.stream.Write(message); err != nil {
		return err
	}
	return nil
}
583578
func (c *Client) EmitJSON(v interface{}) error {
	js := emitJS{}
	js.Id = -1
	js.Data = v

	bytes, err := json.Marshal(js)
	if err != nil {
		return err
	}

	c.Emit(string(bytes))
	return nil
}
913472
func (s *Service) Publish(topic string, payload []byte, qos packet.QOS, retain bool) GenericFuture {
	msg := &packet.Message{
		Topic:   topic,
		Payload: payload,
		QOS:     qos,
		Retain:  retain,
	}

	return s.PublishMessage(msg)
}
434558
func (service *BaseService) Push(topic string, result interface{}, id ...string) {
	t := service.getTopic(topic)
	n := len(id)
	if n == 0 {
		id = t.idlist()
		n = len(id)
		if n == 0 {
			return
		}
	}
	for i := 0; i < n; i++ {
		service.unicast(t, topic, id[i], result, nil)
	}
}