matchmaker

package
v0.0.0-...-b3f6f20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(conf MatchConfig, tickMs int) chan MatchCmd

Types

type IntHeap

type IntHeap []int

An IntHeap is a min-heap of ints.

func (IntHeap) Len

func (h IntHeap) Len() int

func (IntHeap) Less

func (h IntHeap) Less(i, j int) bool

func (*IntHeap) Pop

func (h *IntHeap) Pop() interface{}

func (*IntHeap) Push

func (h *IntHeap) Push(x interface{})

func (IntHeap) Swap

func (h IntHeap) Swap(i, j int)

type JoinCmd

type JoinCmd struct {
	Id    uuid.UUID
	Score int
}

type MatchCmd

type MatchCmd interface {
	// contains filtered or unexported methods
}

type MatchConfig

type MatchConfig struct {
	MinMatchSize   int
	MaxMatchSize   int
	MatchTimeoutMs int
}

type WatchCmd

type WatchCmd struct {
	Id      uuid.UUID
	Channel chan uuid.UUID
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL