Documentation
¶
Index ¶
- Constants
- type Impl
- func (impl *Impl) AcceptInvite(inviterUID string, inviteeInfo *pto.PlayerInfo, groupID int64) error
- func (impl *Impl) CancelMatch(uid string) error
- func (impl *Impl) ChangeRole(captainUID, targetUID string, role entry.GroupRole) error
- func (impl *Impl) CreateGroup(param *pto.CreateGroup) (entry.Group, error)
- func (impl *Impl) DissolveGroup(uid string) error
- func (impl *Impl) EnterGroup(info *pto.EnterGroup, groupID int64) error
- func (impl *Impl) ExitGroup(uid string) error
- func (impl *Impl) HandleMatchResult(r entry.Room)
- func (impl *Impl) Invite(inviterUID, inviteeUID string) error
- func (impl *Impl) KickPlayer(captainUID, kickedUID string) error
- func (impl *Impl) RefuseInvite(inviterUID, inviteeUID string, groupID int64, refuseMsg string)
- func (impl *Impl) SetNearbyJoinGroup(captainUID string, allow bool) error
- func (impl *Impl) SetRecentJoinGroup(captainUID string, allow bool) error
- func (impl *Impl) SetVoiceState(uid string, state entry.PlayerVoiceState) error
- func (impl *Impl) StartMatch(captainUID string) error
- type Option
Constants ¶
View Source
const ( // TimerOpTypeGroupInvite used to dissolve the group if it not starts game after delay. TimerOpTypeGroupInvite timer.OpType = "match:timer_group_invite" // TimerOpTypeGroupMatch if used to cancel match if the group not matched after delay. TimerOpTypeGroupMatch timer.OpType = "match:timer_group_match" // TimerOpTypeGroupWaitAttr used to wait for players to upload attributes after client clicks `StartMatch`. // If all players upload attributes, the group would start to match. // If timeout. the group would auto start to match. TimerOpTypeGroupWaitAttr timer.OpType = "match:timer_group_wait_attr" // nolint )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct { DelayConfig config.DelayTimer // contains filtered or unexported fields }
Impl implements a default service, in most cases, you don't need to implement your own service.
func NewDefault ¶
func (*Impl) AcceptInvite ¶
func (*Impl) CancelMatch ¶
func (*Impl) ChangeRole ¶
func (*Impl) CreateGroup ¶
func (*Impl) DissolveGroup ¶
func (*Impl) EnterGroup ¶
func (impl *Impl) EnterGroup(info *pto.EnterGroup, groupID int64) error
func (*Impl) HandleMatchResult ¶
func (*Impl) KickPlayer ¶
func (*Impl) RefuseInvite ¶
func (*Impl) SetNearbyJoinGroup ¶
func (*Impl) SetRecentJoinGroup ¶
func (*Impl) SetVoiceState ¶
func (impl *Impl) SetVoiceState(uid string, state entry.PlayerVoiceState) error
func (*Impl) StartMatch ¶
type Option ¶
type Option func(*Impl)
func WithDelayConfiger ¶
func WithDelayConfiger(t config.DelayTimer) Option
func WithNowFunc ¶
Click to show internal directories.
Click to hide internal directories.