func (store *Store) AddStream(stream *graylog.Stream) error {
	if stream == nil {
		return fmt.Errorf("stream is nil")
	}
	if stream.ID == "" {
		stream.ID = st.NewObjectID()
	}

	store.imutex.Lock()
	defer store.imutex.Unlock()
	store.streams[stream.ID] = *stream
	return nil
}
// AddStream adds a stream to the store.
AddStream adds a stream to the store.
// AddStream adds a stream to the store .
func (store *Store) AddStream(stream *graylog.Stream) error {
	if stream == nil {
		return fmt.Errorf("stream is nil")
	}
	if stream.ID == "" {
		stream.ID = st.NewObjectID()
	}
	store.imutex.Lock()
	defer store.imutex.Unlock()
	store.streams[stream.ID] = *stream
	return nil
}
func ( store * Store ) AddStream ( stream * graylog . Stream ) error { if stream == nil { return fmt . Errorf ( " " ) } if stream . ID == " " { stream . ID = st . NewObjectID ( ) } store . imutex . Lock ( ) defer store . imutex . Unlock ( ) store . streams [ stream . ID ] = * stream return nil }
AddStream adds a stream to the store.
AddStream adds a stream to the store .