-
Notifications
You must be signed in to change notification settings - Fork 1
Sample/backfill integration #46
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
Open
edge-marge
wants to merge
25
commits into
dev
Choose a base branch
from
sample/backfill-integration
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
89bf685
add backfill DTOs
edge-marge 1f4b084
api methods
edge-marge 6834d39
start server
edge-marge 1fb154f
remove almost identical DTO, continue server
edge-marge aaf3097
continue server
edge-marge f82d71b
remove all backfills
edge-marge 88b5536
client handler start
edge-marge 460ec92
client group update handling
edge-marge 4cfd811
start scene
edge-marge c74a8b4
extra status text
edge-marge ca70997
add client disconnect w todo, missing server abandon check
edge-marge 0e2c296
log edit
edge-marge 4fdcf7b
add self stop
edge-marge 0f9dd8c
move self stop + envs, observable backfill dictionary
edge-marge 106a675
add disconnect on client quit
edge-marge 496e1b2
remove empty scene
edge-marge f606828
start review edits
edge-marge 4b64304
review edits cont.
edge-marge c75f4ef
less code repetition
edge-marge d2a4b6b
review edits cont.
edge-marge ef274ed
Merge pull request #53 from edgegap/dev
orcist fb57c2e
review edits cont.
edge-marge a8af6c7
Merge branch 'main' into sample/backfill-integration
edge-marge 246fab1
fix ticket cast, null check from observable initialization
edge-marge 181c572
fix conditions
edge-marge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| using System.Collections.Generic; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Edgegap.Matchmaking | ||
| { | ||
| public abstract class BackfillRequestDTO<A> | ||
| { | ||
| [JsonProperty("profile")] | ||
| public string Profile; | ||
|
|
||
| [JsonProperty("attributes")] | ||
| public BackfillAttributes Attributes; | ||
|
|
||
| [JsonProperty("tickets")] | ||
| public Dictionary<string, BackfillAssignedTicket<A>> Tickets; | ||
|
|
||
| public BackfillRequestDTO(string profile, BackfillAttributes attributes) | ||
| { | ||
| Profile = profile; | ||
| Attributes = attributes; | ||
| } | ||
|
|
||
| public override string ToString() | ||
| { | ||
| return JsonConvert.SerializeObject(this); | ||
| } | ||
| } | ||
|
|
||
| public class BackfillAssignment : DeploymentDTO | ||
| { | ||
| [JsonProperty("request_id")] | ||
| public string RequestID; | ||
| } | ||
|
|
||
| public class BackfillAttributes | ||
| { | ||
| [JsonProperty("assignment")] | ||
| public BackfillAssignment Assignment; | ||
|
|
||
| public BackfillAttributes(BackfillAssignment assignment) | ||
| { | ||
| Assignment = assignment; | ||
| } | ||
|
|
||
| public override string ToString() | ||
| { | ||
| return JsonConvert.SerializeObject(this); | ||
| } | ||
| } | ||
|
|
||
| public class SimpleBackfillRequestDTO : BackfillRequestDTO<BackfillTicketAttributesDTO> | ||
| { | ||
| public SimpleBackfillRequestDTO() | ||
| : base("", null) { } | ||
|
|
||
| public SimpleBackfillRequestDTO( | ||
| string profile, | ||
| BackfillAttributes attributes, | ||
| Dictionary<string, BackfillAssignedTicket<BackfillTicketAttributesDTO>> tickets | ||
| ) | ||
| : base(profile, attributes) | ||
| { | ||
| Tickets = tickets; | ||
| } | ||
| } | ||
|
|
||
| public class BackfillTicketAttributesDTO : LatenciesAttributesDTO | ||
| { | ||
| [JsonProperty("backfill_group_size")] | ||
| public string[] BackfillGroupSize; | ||
|
|
||
| public BackfillTicketAttributesDTO( | ||
| Dictionary<string, float> beacons, | ||
| string[] backfillGroupSize | ||
| ) | ||
| : base(beacons) | ||
| { | ||
| BackfillGroupSize = backfillGroupSize; | ||
| } | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Edgegap.Matchmaking | ||
| { | ||
| public class BackfillResponseDTO<A> | ||
| { | ||
| [JsonProperty("id")] | ||
| public string ID; | ||
|
|
||
| [JsonProperty("profile")] | ||
| public string Profile; | ||
|
|
||
| [JsonProperty("tickets")] | ||
| public Dictionary<string, InjectedTicketDTO<A>> Tickets; | ||
|
|
||
| [JsonProperty("status")] | ||
| public string Status; | ||
|
|
||
| #nullable enable | ||
| [JsonProperty("assigned_ticket")] | ||
| public InjectedTicketDTO<A>? AssignedTicket; | ||
|
|
||
| [JsonIgnore] | ||
| public DateTime? CreatedAt; | ||
|
|
||
| #nullable disable | ||
|
|
||
| public override string ToString() | ||
| { | ||
| return JsonConvert.SerializeObject(this); | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.