code: func (o *Observer) Notifier(ctx context.Context, total uint) (*Notifier, error) {
  
  	if ctx == nil {
  		return nil, errors.New("Context must be provided")
  	}
  
  	id, ok := ctx.Value(CtxRequestID).(string)
  	if !ok {
  		return nil, errors.New("Missing 'id' property in Context")
  	}
  
  	totalUpdates := make(chan uint)
  	notifications := make(chan *notification)
  
  	t := &transaction{
  		requestID:      id,
  		total:          total,
  		current:        0,
  		totalUpdates:   totalUpdates,
  		events:         o.notify,
  		notifications:  notifications,
  		observerClosed: o.closed,
  		ctxDone:        ctx.Done(),
  	}
  
  	t.start()
  
  	n := &Notifier{
  		total:          total,
  		current:        0,
  		transaction:    t,
  		totalUpdates:   totalUpdates,
  		notifications:  notifications,
  		observerClosed: t.observerClosed,
  		ctxDone:        t.ctxDone,
  	}
  
  	return n, nil
  }
docs: // Notifier creates a new transaction for sending notifications