func (store *Store) GetStreamRules(id string) ([]graylog.StreamRule, int, error) {
	store.imutex.RLock()
	defer store.imutex.RUnlock()
	rules, ok := store.streamRules[id]
	if !ok {
		return nil, 0, nil
	}
	size := len(rules)
	arr := make([]graylog.StreamRule, size)
	i := 0
	for _, rule := range rules {
		arr[i] = rule
		i++
	}
	return arr, size, nil
}
// GetStreamRules returns stream rules of the given stream.
GetStreamRules returns stream rules of the given stream.
// GetStreamRules returns stream rules of the given stream .
func (store *Store) GetStreamRules(id string) ([]graylog.StreamRule, int, error) {
	store.imutex.RLock()
	defer store.imutex.RUnlock()
	rules, ok := store.streamRules[id]
	if !ok {
		return nil, 0, nil
	}
	size := len(rules)
	arr := make([]graylog.StreamRule, size)
	i := 0
	for _, rule := range rules {
		arr[i] = rule
		i++
	}
	return arr, size, nil
}
func ( store * Store ) GetStreamRules ( id string ) ( [ ] graylog . StreamRule , int , error ) { store . imutex . RLock ( ) defer store . imutex . RUnlock ( ) rules , ok := store . streamRules [ id ] if ! ok { return nil , 0 , nil } size := len ( rules ) arr := make ( [ ] graylog . StreamRule , size ) i := 0 for _ , rule := range rules { arr [ i ] = rule i ++ } return arr , size , nil }
GetStreamRules returns stream rules of the given stream.
GetStreamRules returns stream rules of the given stream .