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

feat: Add support for big segments #213

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner January 13, 2025 17:59
@keelerm84 keelerm84 force-pushed the mk/sdk-1032/big-segment-support branch 6 times, most recently from a7a2cbe to 62b63ba Compare January 13, 2025 18:49
@keelerm84 keelerm84 force-pushed the mk/sdk-1032/big-segment-support branch from 62b63ba to 46af7c5 Compare January 13, 2025 18:50
@keelerm84 keelerm84 force-pushed the mk/sdk-1032/big-segment-support branch from 38aa1b6 to 7acecd7 Compare January 15, 2025 18:02
@keelerm84 keelerm84 force-pushed the mk/sdk-1032/big-segment-support branch 2 times, most recently from 0293108 to c9a3649 Compare January 15, 2025 18:32
@keelerm84 keelerm84 force-pushed the mk/sdk-1032/big-segment-support branch from c9a3649 to fd289c7 Compare January 15, 2025 18:35
public function getContextMembership(string $contextKey): ?Impl\BigSegments\MembershipResult
{
if ($this->store === null) {
return null;

Choose a reason for hiding this comment

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

It is a little unclear in which cases null will be returned vs which cases a result with null membership and store error will come back.

*/
class BigSegmentsConfig
{
const DEFAULT_STATUS_POLL_INTERVAL = 5;

Choose a reason for hiding this comment

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

What unit is this? Feels like it is minutes, but I guess could be seconds.

$nextPollingTime = ($this->lastStatusPollTime?->getTimestamp() ?? 0) + $this->config->statusPollInterval;

* will be called only when the SDK needs the latest state, so it should
* not be cached.
*/
public function getMetadata(): Types\BigSegmentsStoreMetadata;

Choose a reason for hiding this comment

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

For failure cases, getMembership returns a nullable, but this does not. Should those be consistent?

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