Documentation ¶
Index ¶
- type ChangeType
- type Commitment
- type HostSelectionMetric
- type MemberConstants
- type MemberConstantsSystem
- type MemberDescription
- type MemberInitialization
- type MemberProperties
- type MemberPropertiesSystem
- type MemberPropertiesSystemSubscription
- type PeerToHostRequirements
- type PeerToPeerRequirements
- type PublishConfig
- type Session
- type SessionCapabilities
- type SessionConstants
- type SessionConstantsSystem
- type SessionConstantsSystemMetrics
- type SessionDescription
- type SessionProperties
- type SessionPropertiesSystem
- type SessionPropertiesSystemMatchmaking
- type SessionReference
- type SessionRestriction
- type SessionVisibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeType ¶
type ChangeType string
const ( ChangeTypeEverything ChangeType = "everything" ChangeTypeHost ChangeType = "host" ChangeTypeInitialization ChangeType = "initialization" ChangeTypeMatchmakingStatus ChangeType = "matchmakingStatus" ChangeTypeMembersList ChangeType = "membersList" ChangeTypeMembersStatus ChangeType = "membersStatus" ChangeTypeJoinability ChangeType = "joinability" ChangeTypeCustomProperty ChangeType = "customProperty" ChangeTypeMembersCustomProperty ChangeType = "membersCustomProperty" )
type Commitment ¶
type Commitment struct { ContractVersion uint32 `json:"contractVersion,omitempty"` CorrelationID uuid.UUID `json:"correlationId,omitempty"` SearchHandle uuid.UUID `json:"searchHandle,omitempty"` Branch uuid.UUID `json:"branch,omitempty"` ChangeNumber uint64 `json:"changeNumber,omitempty"` StartTime time.Time `json:"startTime,omitempty"` NextTimer time.Time `json:"nextTimer,omitempty"` *SessionDescription }
type HostSelectionMetric ¶
type HostSelectionMetric string
const ( HostSelectionMetricBandwidthUp HostSelectionMetric = "bandwidthUp" HostSelectionMetricBandwidthDown HostSelectionMetric = "bandwidthDown" HostSelectionMetricBandwidth HostSelectionMetric = "bandwidth" HostSelectionMetricLatency HostSelectionMetric = "latency" )
type MemberConstants ¶
type MemberConstants struct { System *MemberConstantsSystem `json:"system,omitempty"` Custom json.RawMessage `json:"custom,omitempty"` }
type MemberConstantsSystem ¶
type MemberDescription ¶
type MemberDescription struct { Constants *MemberConstants `json:"constants,omitempty"` Properties *MemberProperties `json:"properties,omitempty"` Roles json.RawMessage `json:"roles,omitempty"` }
type MemberInitialization ¶
type MemberInitialization struct { JoinTimeout uint64 `json:"joinTimeout,omitempty"` MeasurementTimeout uint64 `json:"measurementTimeout,omitempty"` EvaluationTimeout uint64 `json:"evaluationTimeout,omitempty"` ExternalEvaluation bool `json:"externalEvaluation,omitempty"` MembersNeededToStart uint32 `json:"membersNeededToStart,omitempty"` }
type MemberProperties ¶
type MemberProperties struct { System *MemberPropertiesSystem `json:"system,omitempty"` Custom json.RawMessage `json:"custom,omitempty"` }
type MemberPropertiesSystem ¶
type MemberPropertiesSystem struct { Active bool `json:"active,omitempty"` Ready bool `json:"ready,omitempty"` Connection uuid.UUID `json:"connection,omitempty"` Subscription *MemberPropertiesSystemSubscription `json:"subscription,omitempty"` SecureDeviceAddress []byte `json:"secureDeviceAddress,omitempty"` InitializationGroup []uint32 `json:"initializationGroup,omitempty"` Groups []string `json:"groups,omitempty"` Encounters []string `json:"encounters,omitempty"` Measurements json.RawMessage `json:"measurements,omitempty"` ServerMeasurements json.RawMessage `json:"serverMeasurements,omitempty"` }
type MemberPropertiesSystemSubscription ¶
type MemberPropertiesSystemSubscription struct { ID string `json:"id,omitempty"` ChangeTypes []ChangeType `json:"changeTypes,omitempty"` }
type PeerToHostRequirements ¶
type PeerToHostRequirements struct { LatencyMaximum uint64 `json:"latencyMaximum,omitempty"` BandwidthDownMinimum uint64 `json:"bandwidthDownMinimum,omitempty"` BandwidthUpMinimum uint64 `json:"bandwidthUpMinimum,omitempty"` HostSelectionMetric HostSelectionMetric `json:"hostSelectionMetric,omitempty"` }
type PeerToPeerRequirements ¶
type PublishConfig ¶
type PublishConfig struct { RTADialer *rta.Dialer RTAConn *rta.Conn Description *SessionDescription Client *http.Client Logger *slog.Logger }
func (PublishConfig) PublishContext ¶
func (conf PublishConfig) PublishContext(ctx context.Context, src xsapi.TokenSource, ref SessionReference) (s *Session, err error)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) CommitContext ¶
func (s *Session) CommitContext(ctx context.Context, d *SessionDescription) (*Commitment, error)
type SessionCapabilities ¶
type SessionCapabilities struct { Connectivity bool `json:"connectivity,omitempty"` SuppressPresenceActivityCheck bool `json:"suppressPresenceActivityCheck,omitempty"` Gameplay bool `json:"gameplay,omitempty"` Large bool `json:"large,omitempty"` UserAuthorizationStyle bool `json:"userAuthorizationStyle,omitempty"` ConnectionRequiredForActiveMembers bool `json:"connectionRequiredForActiveMembers,omitempty"` CrossPlay bool `json:"crossPlay,omitempty"` Searchable bool `json:"searchable,omitempty"` HasOwners bool `json:"hasOwners,omitempty"` }
type SessionConstants ¶
type SessionConstants struct { System *SessionConstantsSystem `json:"system,omitempty"` Custom json.RawMessage `json:"custom,omitempty"` }
type SessionConstantsSystem ¶
type SessionConstantsSystem struct { MaxMembersCount uint32 `json:"maxMembersCount,omitempty"` Capabilities *SessionCapabilities `json:"capabilities,omitempty"` Visibility SessionVisibility `json:"visibility,omitempty"` Initiators []string `json:"initiators,omitempty"` ReservedRemovalTimeout uint64 `json:"reservedRemovalTimeout,omitempty"` InactiveRemovalTimeout uint64 `json:"inactiveRemovalTimeout,omitempty"` ReadyRemovalTimeout uint64 `json:"readyRemovalTimeout,omitempty"` SessionEmptyTimeout uint64 `json:"sessionEmptyTimeout,omitempty"` Metrics *SessionConstantsSystemMetrics `json:"metrics,omitempty"` MemberInitialization *MemberInitialization `json:"memberInitialization,omitempty"` PeerToPeerRequirements *PeerToPeerRequirements `json:"peerToPeerRequirements,omitempty"` PeerToHostRequirements *PeerToHostRequirements `json:"peerToHostRequirements,omitempty"` MeasurementServerAddresses json.RawMessage `json:"measurementServerAddresses,omitempty"` CloudComputePackage json.RawMessage `json:"cloudComputePackage,omitempty"` }
type SessionDescription ¶
type SessionDescription struct { Constants *SessionConstants `json:"constants,omitempty"` RoleTypes json.RawMessage `json:"roleTypes,omitempty"` Properties *SessionProperties `json:"properties,omitempty"` Members map[string]*MemberDescription `json:"members,omitempty"` }
type SessionProperties ¶
type SessionProperties struct { System *SessionPropertiesSystem `json:"system,omitempty"` Custom json.RawMessage `json:"custom,omitempty"` }
type SessionPropertiesSystem ¶
type SessionPropertiesSystem struct { Keywords []string `json:"keywords,omitempty"` Turn []uint32 `json:"turn,omitempty"` JoinRestriction SessionRestriction `json:"joinRestriction,omitempty"` ReadRestriction SessionRestriction `json:"readRestriction,omitempty"` Closed bool `json:"closed"` Locked bool `json:"locked,omitempty"` Matchmaking *SessionPropertiesSystemMatchmaking `json:"matchmaking,omitempty"` MatchmakingResubmit bool `json:"matchmakingResubmit,omitempty"` InitializationSucceeded bool `json:"initializationSucceeded,omitempty"` Host string `json:"host,omitempty"` ServerConnectionStringCandidates json.RawMessage `json:"serverConnectionStringCandidates,omitempty"` }
type SessionPropertiesSystemMatchmaking ¶
type SessionPropertiesSystemMatchmaking struct { TargetSessionConstants json.RawMessage `json:"targetSessionConstants,omitempty"` ServerConnectionString string `json:"serverConnectionString,omitempty"` }
type SessionReference ¶
type SessionReference struct { ServiceConfigID uuid.UUID `json:"scid,omitempty"` TemplateName string `json:"templateName,omitempty"` Name string `json:"name,omitempty"` }
func (SessionReference) URL ¶
func (ref SessionReference) URL() *url.URL
type SessionRestriction ¶
type SessionRestriction string
const ( SessionRestrictionNone SessionRestriction = "none" SessionRestrictionLocal SessionRestriction = "local" SessionRestrictionFollowed SessionRestriction = "followed" )
type SessionVisibility ¶
type SessionVisibility string
const ( SessionVisibilityPrivate SessionVisibility = "private" SessionVisibilityVisible SessionVisibility = "visible" SessionVisibilityOpen SessionVisibility = "open" )
Click to show internal directories.
Click to hide internal directories.