// WriteNotify returns a channel that is closed when a new entry is written.
188438
func (s *TranslateFile) WriteNotify() <-chan struct{} {
	s.mu.RLock()
	ch := s.writeNotify
	s.mu.RUnlock()
	return ch
}
1181609
func (c *ChannelNotifier) NotifyOpenChannelEvent(chanPoint wire.OutPoint) {

	// Fetch the relevant channel from the database.
	channel, err := c.chanDB.FetchChannel(chanPoint)
	if err != nil {
		log.Warnf("Unable to fetch open channel from the db: %v", err)
	}

	// Send the open event to all channel event subscribers.
	event := OpenChannelEvent{Channel: channel}
	if err := c.ntfnServer.SendUpdate(event); err != nil {
		log.Warnf("Unable to send open channel update: %v", err)
	}
}
1357296
func (s *StartDocumentAnalysisInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentAnalysisInput {
	s.NotificationChannel = v
	return s
}
1068132
func (f NotifyHandlerFunc) ServeNotify(r Request, n Notifier) {
	f(r, n)
}
37559
func (notifier *Notifier) AutoNotify(rawData ...interface{}) {
	if err := recover(); err != nil {
		severity := notifier.getDefaultSeverity(rawData, SeverityError)
		state := HandledState{SeverityReasonHandledPanic, severity, true, ""}
		rawData = notifier.appendStateIfNeeded(rawData, state)
		// We strip the following stackframes as they don't add much
		// information but would mess with the grouping algorithm
		// { "file": "github.com/bugsnag/bugsnag-go/notifier.go", "lineNumber": 116, "method": "(*Notifier).AutoNotify" },
		// { "file": "runtime/asm_amd64.s", "lineNumber": 573, "method": "call32" },
		skipFrames := 2
		notifier.NotifySync(errors.New(err, skipFrames), true, rawData...)
		panic(err)
	}
}
461457
func (e *EventSubscriber) Notify(event *ct.Event) {
	if len(e.objectTypes) > 0 {
		foundType := false
		for _, typ := range e.objectTypes {
			if typ == string(event.ObjectType) {
				foundType = true
				break
			}
		}
		if !foundType {
			return
		}
	}
	if e.objectID != "" && e.objectID != event.ObjectID {
		return
	}
	select {
	case e.queue <- event:
	default:
		// Run in a goroutine to avoid deadlock with Notify
		go e.CloseWithError(ErrEventBufferOverflow)
	}
}
475893
func Notify(appName string, title string, text string, iconPath string) {
	notification(appName, title, text, iconPath)
}
1242293
func (n *Notifier) SendNotice(notice *Notice) (string, error) {
	if n.closed() {
		return "", errClosed
	}
	return n.sendNotice(notice)
}
1325107
func (s *Server) FloodNotify() {
	s.floodLock.RLock()
	defer s.floodLock.RUnlock()

	for _, ch := range s.floodCh {
		select {
		case ch <- struct{}{}:
		default:
		}
	}
}
741841
func (c *BitcoindClient) NotifyReceived(addrs []btcutil.Address) error {
	c.NotifyBlocks()

	select {
	case c.rescanUpdate <- addrs:
	case <-c.quit:
		return ErrBitcoindClientShuttingDown
	}

	return nil
}
1331471
func (c CompressResponseWriter) CloseNotify() <-chan bool {
	if c.parentNotify != nil {
		return c.parentNotify
	}
	return c.closeNotify
}
1056565
func (s *Instance) Notify(sig os.Signal) {
	glog.V(1).Infof("Notify: sending signal %v", sig)
	select {
	case s.signalChan <- sig:
		glog.V(1).Infof("Notify: sent signal %v", sig)
	default:
		// This may happen if we're trying to kill a process that has already died. The controller will first send
		// SIGTERM, then it will try SIGKILL
		glog.Warningf("Notify: unable to send signal %v because channel is full", sig)
	}
}
595158
func (p *Project) Notify(eventType events.EventType, serviceName string, data map[string]string) {
	if eventType == events.NoEvent {
		return
	}

	event := events.Event{
		EventType:   eventType,
		ServiceName: serviceName,
		Data:        data,
	}

	for _, l := range p.listeners {
		l <- event
	}
}
143280
func (b *BlockChain) sendNotification(typ NotificationType, data interface{}) {
	// Generate and send the notification.
	n := Notification{Type: typ, Data: data}
	b.notificationsLock.RLock()
	for _, callback := range b.notifications {
		callback(&n)
	}
	b.notificationsLock.RUnlock()
}
110552
func (c *Client) SendNotify(route string, data []byte) error {
	_, err := c.sendMsg(message.Notify, route, data)
	return err
}
795515
func (c Client) AddNotification(n contract.Notification) (string, error) {
	conn := c.Pool.Get()
	defer conn.Close()

	err := addNotification(conn, &n)
	if err != nil {
		return "", err
	}
	return n.ID, nil
}
982997
func (s *AccountTakeoverActionType) SetNotify(v bool) *AccountTakeoverActionType {
	s.Notify = &v
	return s
}