Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subSocket.Topics() is not accessible #138

Open
shanduur opened this issue Jan 3, 2023 · 0 comments
Open

subSocket.Topics() is not accessible #138

shanduur opened this issue Jan 3, 2023 · 0 comments

Comments

@shanduur
Copy link

shanduur commented Jan 3, 2023

As the NewSub returns interface, and subSocket is not exported, the Topics() function is not accessible.

NewSub:

zmq4/sub.go

Line 16 in 2ae9328

func NewSub(ctx context.Context, opts ...Option) Socket {

Topics:

zmq4/sub.go

Lines 120 to 129 in 2ae9328

func (sub *subSocket) Topics() []string {
sub.mu.RLock()
var topics = make([]string, 0, len(sub.topics))
for topic := range sub.topics {
topics = append(topics, topic)
}
sub.mu.RUnlock()
sort.Strings(topics)
return topics
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant