func (store *Store) UpdateStream(prms *graylog.StreamUpdateParams) (*graylog.Stream, error) {
	store.imutex.Lock()
	defer store.imutex.Unlock()
	stream, ok := store.streams[prms.ID]
	if !ok {
		return nil, fmt.Errorf("the stream <%s> is not found", prms.ID)
	}
	if prms.Title != "" {
		stream.Title = prms.Title
	}
	if prms.IndexSetID != "" {
		stream.IndexSetID = prms.IndexSetID
	}
	if prms.Description != "" {
		stream.Description = prms.Description
	}
	if prms.Outputs != nil {
		stream.Outputs = prms.Outputs
	}
	if prms.MatchingType != "" {
		stream.MatchingType = prms.MatchingType
	}
	if prms.Rules != nil {
		stream.Rules = prms.Rules
	}
	if prms.AlertConditions != nil {
		stream.AlertConditions = prms.AlertConditions
	}
	if prms.AlertReceivers != nil {
		stream.AlertReceivers = prms.AlertReceivers
	}
	if prms.RemoveMatchesFromDefaultStream != nil {
		stream.RemoveMatchesFromDefaultStream = *prms.RemoveMatchesFromDefaultStream
	}
	store.streams[stream.ID] = stream
	return &stream, nil
}
// UpdateStream updates a stream at the store.
UpdateStream updates a stream at the store.
// UpdateStream updates a stream at the store .
func (store *Store) UpdateStream(prms *graylog.StreamUpdateParams) (*graylog.Stream, error) {
	store.imutex.Lock()
	defer store.imutex.Unlock()
	stream, ok := store.streams[prms.ID]
	if !ok {
		return nil, fmt.Errorf("the stream <%s> is not found", prms.ID)
	}
	if prms.Title != "" {
		stream.Title = prms.Title
	}
	if prms.IndexSetID != "" {
		stream.IndexSetID = prms.IndexSetID
	}
	if prms.Description != "" {
		stream.Description = prms.Description
	}
	if prms.Outputs != nil {
		stream.Outputs = prms.Outputs
	}
	if prms.MatchingType != "" {
		stream.MatchingType = prms.MatchingType
	}
	if prms.Rules != nil {
		stream.Rules = prms.Rules
	}
	if prms.AlertConditions != nil {
		stream.AlertConditions = prms.AlertConditions
	}
	if prms.AlertReceivers != nil {
		stream.AlertReceivers = prms.AlertReceivers
	}
	if prms.RemoveMatchesFromDefaultStream != nil {
		stream.RemoveMatchesFromDefaultStream = *prms.RemoveMatchesFromDefaultStream
	}
	store.streams[stream.ID] = stream
	return &stream, nil
}
func ( store * Store ) UpdateStream ( prms * graylog . StreamUpdateParams ) ( * graylog . Stream , error ) { store . imutex . Lock ( ) defer store . imutex . Unlock ( ) stream , ok := store . streams [ prms . ID ] if ! ok { return nil , fmt . Errorf ( " " , prms . ID ) } if prms . Title != " " { stream . Title = prms . Title } if prms . IndexSetID != " " { stream . IndexSetID = prms . IndexSetID } if prms . Description != " " { stream . Description = prms . Description } if prms . Outputs != nil { stream . Outputs = prms . Outputs } if prms . MatchingType != " " { stream . MatchingType = prms . MatchingType } if prms . Rules != nil { stream . Rules = prms . Rules } if prms . AlertConditions != nil { stream . AlertConditions = prms . AlertConditions } if prms . AlertReceivers != nil { stream . AlertReceivers = prms . AlertReceivers } if prms . RemoveMatchesFromDefaultStream != nil { stream . RemoveMatchesFromDefaultStream = * prms . RemoveMatchesFromDefaultStream } store . streams [ stream . ID ] = stream return & stream , nil }
UpdateStream updates a stream at the store.
UpdateStream updates a stream at the store .