More clarity in actor event API docs

This commit is contained in:
Rod Vagg 2024-02-26 21:28:18 +11:00 committed by Phi-rjan
parent 966af80dc2
commit 5633861ce6
3 changed files with 26 additions and 10 deletions

View File

@ -911,13 +911,21 @@ type FullNode interface {
// GetActorEvents returns all FVM and built-in Actor events that match the given filter.
// This is a request/response API.
// Results available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange
// configuration options and also the amount of historical data available in the node.
GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) //perm:read
// SubscribeActorEvents returns a long-lived stream of all FVM and built-in Actor events that match the given filter.
// Events that match the given filter are written to the stream in real-time as they are emitted from the FVM.
// The response stream is closed when the client disconnects or if there is an error while writing an event to the stream.
// This API also allows clients to read all historical events matching the given filter before
// any real-time events are written to the response stream.
// SubscribeActorEvents returns a long-lived stream of all FVM and built-in Actor events that
// match the given filter.
// Events that match the given filter are written to the stream in real-time as they are emitted
// from the FVM.
// The response stream is closed when the client disconnects, when a ToHeight is specified and is
// reached, or if there is an error while writing an event to the stream.
// This API also allows clients to read all historical events matching the given filter before any
// real-time events are written to the response stream if the filter specifies an earlier
// FromHeight.
// Results available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange
// configuration options and also the amount of historical data available in the node.
// NOTE: THIS API IS ONLY SUPPORTED OVER WEBSOCKETS FOR NOW
SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) //perm:read
}

Binary file not shown.

View File

@ -3392,6 +3392,8 @@ Response:
### GetActorEvents
GetActorEvents returns all FVM and built-in Actor events that match the given filter.
This is a request/response API.
Results available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange
configuration options and also the amount of historical data available in the node.
Perms: read
@ -8827,11 +8829,17 @@ Response:
### SubscribeActorEvents
SubscribeActorEvents returns a long-lived stream of all FVM and built-in Actor events that match the given filter.
Events that match the given filter are written to the stream in real-time as they are emitted from the FVM.
The response stream is closed when the client disconnects or if there is an error while writing an event to the stream.
This API also allows clients to read all historical events matching the given filter before
any real-time events are written to the response stream.
SubscribeActorEvents returns a long-lived stream of all FVM and built-in Actor events that
match the given filter.
Events that match the given filter are written to the stream in real-time as they are emitted
from the FVM.
The response stream is closed when the client disconnects, when a ToHeight is specified and is
reached, or if there is an error while writing an event to the stream.
This API also allows clients to read all historical events matching the given filter before any
real-time events are written to the response stream if the filter specifies an earlier
FromHeight.
Results available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange
configuration options and also the amount of historical data available in the node.
NOTE: THIS API IS ONLY SUPPORTED OVER WEBSOCKETS FOR NOW