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

Support state stream API #495

Closed
jribbink opened this issue Nov 7, 2023 · 0 comments · Fixed by #496
Closed

Support state stream API #495

jribbink opened this issue Nov 7, 2023 · 0 comments · Fixed by #496
Assignees
Labels

Comments

@jribbink
Copy link
Contributor

jribbink commented Nov 7, 2023

Problem

The emulator does not currently implement the state stream API needed for events streaming

Steps to Reproduce

Try using events streaming (i.e. ws://localhost:8888/v1/subscribe_events) and the endpoint will not be available because the state_stream.API instance used to instantiate the REST server is nil

srv, err := rest.NewServer(
adapter,
rest.Config{
ListenAddress: fmt.Sprintf("%s:3333", host),
WriteTimeout: rest.DefaultWriteTimeout,
ReadTimeout: rest.DefaultReadTimeout,
IdleTimeout: rest.DefaultIdleTimeout,
},
debugLogger,
chain,
restCollector,
nil,
backend.Config{
EventFilterConfig: state_stream.DefaultEventFilterConfig,
ClientSendTimeout: state_stream.DefaultSendTimeout,
ClientSendBufferSize: state_stream.DefaultSendBufferSize,
MaxGlobalStreams: state_stream.DefaultMaxGlobalStreams,
HeartbeatInterval: state_stream.DefaultHeartbeatInterval,
},

Acceptance Criteria

Event streaming supported by emulator

Context

Blocking adoption of event streaming API (i.e. onflow/fcl-js#1791)

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

Successfully merging a pull request may close this issue.

2 participants