Documentation ¶
Index ¶
- Constants
- func CreateDoubleArgs() map[string]float64
- func CreateStringArgs() map[string]string
- func TagFromFloatSlice(tags []float64) float64
- func TagFromStringSlice(tags []string) string
- type MatchRequest
- type Player
- type RequestMatchFunc
- type TimeIntervalPlayerSimulator
- func (p *TimeIntervalPlayerSimulator) AddPlayers(players []*Player)
- func (p *TimeIntervalPlayerSimulator) CreateMatchmakingRequests()
- func (p *TimeIntervalPlayerSimulator) CreatePlayers(count int) ([]*Player, error)
- func (p *TimeIntervalPlayerSimulator) RequestMatchForPlayers(players []*Player) error
- func (p *TimeIntervalPlayerSimulator) Run(ctx context.Context) error
Constants ¶
View Source
const (
GAME_MODE_SESSION = "mode.session"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDoubleArgs ¶
func CreateStringArgs ¶
func TagFromFloatSlice ¶
func TagFromStringSlice ¶
Types ¶
type MatchRequest ¶
type Player ¶
type Player struct { UID string MatchRequest *MatchRequest }
type RequestMatchFunc ¶
type RequestMatchFunc func(ctx context.Context, ticket *pb.CreateTicketRequest, opts ...grpc.CallOption) (*pb.Ticket, error)
type TimeIntervalPlayerSimulator ¶
type TimeIntervalPlayerSimulator struct { Interval time.Duration PlayersPool int RequestMatchFunc RequestMatchFunc Players []*Player // contains filtered or unexported fields }
- Create pool of players - Request match on a interval basis
func NewTimeIntervalPlayerSimulator ¶
func NewTimeIntervalPlayerSimulator(interval string, playersPool int, requestMatchFunc RequestMatchFunc) (*TimeIntervalPlayerSimulator, error)
func (*TimeIntervalPlayerSimulator) AddPlayers ¶
func (p *TimeIntervalPlayerSimulator) AddPlayers(players []*Player)
func (*TimeIntervalPlayerSimulator) CreateMatchmakingRequests ¶
func (p *TimeIntervalPlayerSimulator) CreateMatchmakingRequests()
func (*TimeIntervalPlayerSimulator) CreatePlayers ¶
func (p *TimeIntervalPlayerSimulator) CreatePlayers(count int) ([]*Player, error)
func (*TimeIntervalPlayerSimulator) RequestMatchForPlayers ¶
func (p *TimeIntervalPlayerSimulator) RequestMatchForPlayers(players []*Player) error
Click to show internal directories.
Click to hide internal directories.