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

Add support of watching events to Connection #80

Merged
merged 3 commits into from Nov 7, 2022
Merged

Conversation

ondrej-fabry
Copy link
Member

@ondrej-fabry ondrej-fabry commented Nov 3, 2022

This PR adds support for event watching to Connection (Stream API). This initial draft proposal was done by @edwarnicke in #42. However, this PR does not change the generated RPC code in any way for now.

Quick look at the new API:

type Connection {
	// ...
	WatchEvent(ctx context.Context, event Message) (Watcher, error)
}

type Watcher interface {
	Events() <-chan Message
	Close()
}

See the stream-client example for usage details.

Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
@ondrej-fabry ondrej-fabry added the feature New Feature label Nov 3, 2022
@ondrej-fabry ondrej-fabry added this to the v0.7.0 milestone Nov 3, 2022
@ondrej-fabry ondrej-fabry self-assigned this Nov 3, 2022
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
api/api.go Show resolved Hide resolved
@ondrej-fabry ondrej-fabry merged commit 344b3ab into master Nov 7, 2022
@ondrej-fabry ondrej-fabry deleted the event-watcher branch November 7, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support of VPP events to Stream API
2 participants