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

Added many cluster methods & improved testing #244

Merged
merged 21 commits into from
Aug 29, 2019

Conversation

atais
Copy link

@atais atais commented Aug 22, 2019

Hi again 😄
please merge after #246

Work in progress for tickets:

and continuation of #243

Added:

@atais atais force-pushed the cluster-methods branch 5 times, most recently from 58a7480 to 74bbf72 Compare August 22, 2019 15:58
val commands = makeSortArgs(key, limit, desc, alpha, by, get) ::: List("STORE", storeAt)
send("SORT", commands)(asLong)
}

Copy link
Owner

Choose a reason for hiding this comment

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

Why is sort part of SetOperations ?

Copy link
Author

Choose a reason for hiding this comment

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

Well you are right it should be some other part of api. Which one would you recommend?

Copy link
Owner

Choose a reason for hiding this comment

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

I think BaseOperations will be better ..

Copy link
Author

Choose a reason for hiding this comment

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

moved back :)

@@ -47,6 +53,22 @@ trait RedisClusterOps extends AutoCloseable {
nodeForKey(key).withClient(body(_))
}

// todo: need Cats Semigroup instance for T to combine, add Cats?
// https://typelevel.org/cats/typeclasses/semigroup.html
Copy link
Owner

Choose a reason for hiding this comment

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

One of the targets in this library was to keep it free of any dependencies. We could add cats but then I would design the library in a different way using cats-effects to model all effects ..

Copy link
Author

Choose a reason for hiding this comment

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

Sure. It is not a big deal at the moment but since most of the api is based on Option[A] it's difficult to model cluster api with Iterable[A] result to fit it.

To be honest I don't know what is best now :) I can delete the comment, however it will probably be a topic for further discussion at some point anyway

Copy link
Author

Choose a reason for hiding this comment

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

i just left todo with a note, i hope its fine.

@atais atais force-pushed the cluster-methods branch 6 times, most recently from fb912e2 to 1d1a48d Compare August 26, 2019 10:38
@atais
Copy link
Author

atais commented Aug 26, 2019

I went carefully commit by commit to reduce changes.
Now the formatting is really broken, and maybe formatting commit for the whole package would be useful, but changes are crystal clear.

I reverted changes for sort and sortNstore methods.
Should be fine now :)

@atais
Copy link
Author

atais commented Aug 28, 2019

I have removed breaking changes so I could put them all soon in another commit

See the travis output here https://github.com/atais/scala-redis/commits/cluster-methods

@atais atais changed the title Added some cluster methods & improved testing Added many cluster methods & improved testing Aug 28, 2019
@debasishg debasishg merged commit 8ac0ebc into debasishg:master Aug 29, 2019
@atais atais deleted the cluster-methods branch August 29, 2019 11:35
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