func (ps *PubSub) GetSubscriptions(cl stypes.Client) ([]string, error) {
	ps.subLock.RLock()
	defer ps.subLock.RUnlock()

	cs, ok := ps.clientSubs[cl]
	if !ok {
		return []string{}, nil
	}

	ret := make([]string, 0, len(cs))
	for sub := range cs {
		ret = append(ret, sub)
	}
	return ret, nil
}
// Returns all the subscriptions a client is subscribed to
Returns all the subscriptions a client is subscribed to
// Returns all the subscriptions a client is subscribed to
func (ps *PubSub) GetSubscriptions(cl stypes.Client) ([]string, error) {
	ps.subLock.RLock()
	defer ps.subLock.RUnlock()
	cs, ok := ps.clientSubs[cl]
	if !ok {
		return []string{}, nil
	}
	ret := make([]string, 0, len(cs))
	for sub := range cs {
		ret = append(ret, sub)
	}
	return ret, nil
}
func ( ps * PubSub ) GetSubscriptions ( cl stypes . Client ) ( [ ] string , error ) { ps . subLock . RLock ( ) defer ps . subLock . RUnlock ( ) cs , ok := ps . clientSubs [ cl ] if ! ok { return [ ] string { } , nil } ret := make ( [ ] string , 0 , len ( cs ) ) for sub := range cs { ret = append ( ret , sub ) } return ret , nil }
Returns all the subscriptions a client is subscribed to
Returns all the subscriptions a client is subscribed to