Skip to content

Add queueing structure and Connect method to gRIBI client.#5

Merged
robshakir merged 3 commits intomainfrom
fluent-1
Jun 2, 2021
Merged

Add queueing structure and Connect method to gRIBI client.#5
robshakir merged 3 commits intomainfrom
fluent-1

Conversation

@robshakir
Copy link
Copy Markdown
Member

  * (M) client/client.go
  * (M) client/client_test.go
    - Add support for a set of queues within the client that store
      responses for modify streams.
    - Add basic test coverage for the queueing logic - additional
      test coverage to be added through integration with the
      fake server.

robshakir added 2 commits May 27, 2021 22:55
  * (M) client/client.go
  * (M) client/client_test.go
    - Add support for a set of queues within the client that store
      responses for modify streams.
    - Add basic test coverage for the queueing logic - additional
      test coverage to be added through integration with the
      fake server.
@robshakir robshakir requested a review from sthesayi May 28, 2021 07:11
Copy link
Copy Markdown
Contributor

@sthesayi sthesayi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments.

return fmt.Errorf("cannot open Modify RPC, %v", err)
}

go func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would be better if this was a separate function but inline is fine too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I err towards keeping these in-line because of the context that they're writing to. Essentially, I don't think they're ever testable, or callable (safely) outside of the Connect function, since they should never be called twice on the same connection. This way we can add (and probably should add) some state in the client that says "are we connected" and if so set up this stream. I didn't see a use-case for a client that doesn't have a Modify stream.

@robshakir
Copy link
Copy Markdown
Member Author

Thanks for the review @sthesayi -- I'll merge when you've had a chance to look at the other PRs that this depends on.

@robshakir robshakir changed the base branch from fluent-0 to main June 2, 2021 18:03
@robshakir robshakir merged commit e981a65 into main Jun 2, 2021
@robshakir robshakir deleted the fluent-1 branch June 22, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants