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

chore: Mark Streaming resources as Deprecated #175

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading