openmatch

package
v0.0.0-...-63c973b Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignTickets

func AssignTickets(client pb.BackendServiceClient, allocatorService *allocator.AllocatorService) director.AssignFunc

func CleanUpAssignmentsWithoutConnection

func CleanUpAssignmentsWithoutConnection(group []*pb.AssignmentGroup) []*pb.AssignmentGroup

func ConnFuncInsecure

func ConnFuncInsecure() (*grpc.ClientConn, error)

func ConnFuncSecure

func ConnFuncSecure() (*grpc.ClientConn, error)

TODO: Implement secure dialer

func CreateAssignTicketRequestForMatch

func CreateAssignTicketRequestForMatch(match *pb.Match) *pb.AssignTicketsRequest

func DoubleRangeFilterFromSlice

func DoubleRangeFilterFromSlice(tags []*pb.DoubleRangeFilter) *pb.DoubleRangeFilter

func FetchMatches

func FetchMatches(client pb.BackendServiceClient, matchFunctionServer MatchFunctionServer) director.FetchMatchesFunc

func GenerateProfiles

func GenerateProfiles() director.GenerateProfilesFunc

generateProfiles generates profiles for every world assigning region, latency and skill randomly

func RunDirector

func RunDirector(ctx context.Context, logger *logrus.Entry, dial ConnFunc, interval string, allocatorService *allocator.AllocatorService) error

func TagFromStringSlice

func TagFromStringSlice(tags []string) string

Types

type Assigner

type Assigner interface {
	AssignTickets(ctx context.Context, in *pb.AssignTicketsRequest, opts ...grpc.CallOption) (*pb.AssignTicketsResponse, error)
}

type ConnFunc

type ConnFunc func() (*grpc.ClientConn, error)

type FetchResponse

type FetchResponse struct {
	Matches []*pb.Match
	Err     error
}

type MatchFunctionServer

type MatchFunctionServer struct {
	HostName string
	Port     int32
}

Jump to

Keyboard shortcuts

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