Skip to content

Commit

Permalink
chore: Mark Streaming resources as Deprecated (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
cynicaljoy authored Oct 23, 2024
1 parent 94be7ea commit 44bc772
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ func (c *Client) Paginate(fql *Query, opts ...QueryOptFn) *QueryIterator {
//
// Note that the query provided MUST return [fauna.Stream] value. Otherwise,
// this method returns an error.
//
// Deprecated: will be replaced in future versions
func (c *Client) Stream(fql *Query, opts ...QueryOptFn) (*Events, error) {
res, err := c.Query(fql, opts...)
if err != nil {
Expand All @@ -318,6 +320,8 @@ func (c *Client) Stream(fql *Query, opts ...QueryOptFn) (*Events, error) {
}

// Subscribe initiates a stream subscription for the given stream value.
//
// Deprecated: will be replaced in future versions
func (c *Client) Subscribe(stream Stream, opts ...StreamOptFn) (*Events, error) {
return subscribe(c, stream, opts...)
}
Expand Down
2 changes: 2 additions & 0 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func (e *ErrEvent) Unmarshal(into any) error {
// not read to completion and closed. By default, Fauna's region groups use the
// HTTP/2.x protocol where this restriction don't apply. However, if connecting
// to Fauna via an HTTP/1.x proxy, be aware of the events iterator closing time.
//
// Deprecated: will be replaced in future versions
type Events struct {
client *Client
stream Stream
Expand Down

0 comments on commit 44bc772

Please sign in to comment.