mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
REST VC: Subscribe to Beacon API events (#13354)
* Initial code for head event streaming * handle events and error * keepalive event * tests * generate new mock * remove single case select * cleanup * explain eventByteLimit * use 2 channels in test * review * more review --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
gwruntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/pkg/errors"
|
||||
fastssz "github.com/prysmaticlabs/fastssz"
|
||||
"github.com/prysmaticlabs/prysm/v4/api"
|
||||
"github.com/prysmaticlabs/prysm/v4/api/gateway"
|
||||
"github.com/prysmaticlabs/prysm/v4/api/server"
|
||||
"github.com/prysmaticlabs/prysm/v4/async/event"
|
||||
@@ -851,7 +852,7 @@ func (c *ValidatorClient) registerRPCGatewayService(router *mux.Router) error {
|
||||
},
|
||||
}),
|
||||
gwruntime.WithMarshalerOption(
|
||||
"text/event-stream", &gwruntime.EventSourceJSONPb{}, // TODO: remove this
|
||||
api.EventStreamMediaType, &gwruntime.EventSourceJSONPb{}, // TODO: remove this
|
||||
),
|
||||
gwruntime.WithForwardResponseOption(gateway.HttpResponseModifier),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user