mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
feat: gate allocator roster publication
This commit is contained in:
@@ -32,6 +32,12 @@ type DurableAssignment struct {
|
||||
Revision uint64
|
||||
}
|
||||
|
||||
type PostgresRosterStore struct{ DB *sql.DB }
|
||||
|
||||
func (s PostgresRosterStore) PublishRoster(ctx context.Context, assignment domain.Assignment, roster []domain.SignedJoinAuthorisation, verify func([]byte, []byte) bool) error {
|
||||
return SaveVerifiedAssignmentRoster(ctx, s.DB, assignment, roster, verify)
|
||||
}
|
||||
|
||||
const AssignmentUpsertSQL = `INSERT INTO assignments
|
||||
(match_id, player_id, allocation_id, server_id, slot, region, client_build,
|
||||
protocol_version, transport, endpoint, join_authorisation, manifest_digest,
|
||||
|
||||
Reference in New Issue
Block a user