Documentation ¶
Overview ¶
Package testing provides testing primitives for the codebase.
Index ¶
- type FakeFrontend
- func (s *FakeFrontend) AcknowledgeBackfill(ctx context.Context, req *pb.AcknowledgeBackfillRequest) (*pb.AcknowledgeBackfillResponse, error)
- func (s *FakeFrontend) CreateBackfill(ctx context.Context, req *pb.CreateBackfillRequest) (*pb.Backfill, error)
- func (s *FakeFrontend) CreateTicket(ctx context.Context, req *pb.CreateTicketRequest) (*pb.Ticket, error)
- func (s *FakeFrontend) DeleteBackfill(ctx context.Context, req *pb.DeleteBackfillRequest) (*emptypb.Empty, error)
- func (s *FakeFrontend) DeleteTicket(ctx context.Context, req *pb.DeleteTicketRequest) (*emptypb.Empty, error)
- func (s *FakeFrontend) GetBackfill(ctx context.Context, req *pb.GetBackfillRequest) (*pb.Backfill, error)
- func (s *FakeFrontend) GetTicket(ctx context.Context, req *pb.GetTicketRequest) (*pb.Ticket, error)
- func (s *FakeFrontend) UpdateBackfill(ctx context.Context, req *pb.UpdateBackfillRequest) (*pb.Backfill, error)
- func (s *FakeFrontend) WatchAssignments(req *pb.WatchAssignmentsRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeFrontend ¶
type FakeFrontend struct { }
FakeFrontend is an empty gRPC handler.
func (*FakeFrontend) AcknowledgeBackfill ¶
func (s *FakeFrontend) AcknowledgeBackfill(ctx context.Context, req *pb.AcknowledgeBackfillRequest) (*pb.AcknowledgeBackfillResponse, error)
AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info. This triggers an assignment process.
func (*FakeFrontend) CreateBackfill ¶
func (s *FakeFrontend) CreateBackfill(ctx context.Context, req *pb.CreateBackfillRequest) (*pb.Backfill, error)
CreateBackfill creates a new Backfill object.
func (*FakeFrontend) CreateTicket ¶
func (s *FakeFrontend) CreateTicket(ctx context.Context, req *pb.CreateTicketRequest) (*pb.Ticket, error)
CreateTicket will create a new ticket, assign a Ticket id to it and put the Ticket in state storage. It will then look through the 'properties' field for the attributes defined as indices the matchmakaking config. If the attributes exist and are valid integers, they will be indexed. Creating a ticket adds the Ticket to the pool of Tickets considered for matchmaking.
func (*FakeFrontend) DeleteBackfill ¶
func (s *FakeFrontend) DeleteBackfill(ctx context.Context, req *pb.DeleteBackfillRequest) (*emptypb.Empty, error)
DeleteBackfill deletes a Backfill by its ID.
func (*FakeFrontend) DeleteTicket ¶
func (s *FakeFrontend) DeleteTicket(ctx context.Context, req *pb.DeleteTicketRequest) (*emptypb.Empty, error)
DeleteTicket removes the Ticket from state storage and from corresponding configured indices. Deleting the ticket stops the ticket from being considered for future matchmaking requests.
func (*FakeFrontend) GetBackfill ¶
func (s *FakeFrontend) GetBackfill(ctx context.Context, req *pb.GetBackfillRequest) (*pb.Backfill, error)
GetBackfill fetches a Backfill object by its ID.
func (*FakeFrontend) GetTicket ¶
func (s *FakeFrontend) GetTicket(ctx context.Context, req *pb.GetTicketRequest) (*pb.Ticket, error)
GetTicket fetches the ticket associated with the specified Ticket id.
func (*FakeFrontend) UpdateBackfill ¶
func (s *FakeFrontend) UpdateBackfill(ctx context.Context, req *pb.UpdateBackfillRequest) (*pb.Backfill, error)
UpdateBackfill updates a Backfill object, if present.
func (*FakeFrontend) WatchAssignments ¶
func (s *FakeFrontend) WatchAssignments(req *pb.WatchAssignmentsRequest, stream pb.FrontendService_WatchAssignmentsServer) error
WatchAssignments streams matchmaking results from Open Match for the provided Ticket id.