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

examples/subscribe. go and examples/monitor. go #690

Open
heaxo opened this issue Sep 7, 2023 · 1 comment
Open

examples/subscribe. go and examples/monitor. go #690

heaxo opened this issue Sep 7, 2023 · 1 comment

Comments

@heaxo
Copy link

heaxo commented Sep 7, 2023

I would like to know the difference between examples/subscribe.go and examples/monitor.go, and who should I choose

@kung-foo
Copy link
Member

kung-foo commented Sep 7, 2023

The "subscription" example uses a lower-level API for subscribing to changes, but you are responsible for more "book keeping" (i.e. managing handles). The "monitor" example uses a higher-level (but more opinionated) API which can simplify access but at the cost of less configurability.

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

2 participants