Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an events HTTP client that wraps the base HTTP client and provides typed methods for interacting with the events API.
func New ¶
New creates a new events HTTP client with the given base URL and options. The url parameter should point to the API endpoint, e.g. "http://localhost:8084/api".
func (*Client) WatchEvents ¶
func (c *Client) WatchEvents(ctx context.Context, filter schema.EventFilter, fn func(schema.Event) error) error
WatchEvents calls the function with each event which matches the filter, as the server streams them, until the context is cancelled, when it returns nil, or the function returns an error, or the stream ends. When the server stops, it returns ErrServiceUnavailable.