Documentation
¶
Overview ¶
Package backend is a generated protocol buffer package.
It is generated from these files:
backend.proto
It has these top-level messages:
Profile MatchObject Result Roster ConnectionInfo Assignments
package backend should be a copy of the compiled gRPC protobuf file used by the backend API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAPIServer ¶
Types ¶
type APIClient ¶
type APIClient interface { // Calls to ask the matchmaker to run a matchmaking function. // // Run MMF once. Return a matchobject that fits this profile. CreateMatch(ctx context.Context, in *Profile, opts ...grpc.CallOption) (*MatchObject, error) // Continually run MMF and stream matchobjects that fit this profile until // client closes the connection. ListMatches(ctx context.Context, in *Profile, opts ...grpc.CallOption) (API_ListMatchesClient, error) // Delete a matchobject from state storage manually. (Matchobjects in state // storage will also automatically expire after a while) DeleteMatch(ctx context.Context, in *MatchObject, opts ...grpc.CallOption) (*Result, error) // Call that manage communication of DGS connection info to players. // // Write the DGS connection info for the list of players in the // Assignments.roster to state storage, so that info can be read by the game // client(s). CreateAssignments(ctx context.Context, in *Assignments, opts ...grpc.CallOption) (*Result, error) // Remove DGS connection info for the list of players in the Roster from // state storage. DeleteAssignments(ctx context.Context, in *Roster, opts ...grpc.CallOption) (*Result, error) }
func NewAPIClient ¶
func NewAPIClient(cc *grpc.ClientConn) APIClient
type APIServer ¶
type APIServer interface { // Calls to ask the matchmaker to run a matchmaking function. // // Run MMF once. Return a matchobject that fits this profile. CreateMatch(context.Context, *Profile) (*MatchObject, error) // Continually run MMF and stream matchobjects that fit this profile until // client closes the connection. ListMatches(*Profile, API_ListMatchesServer) error // Delete a matchobject from state storage manually. (Matchobjects in state // storage will also automatically expire after a while) DeleteMatch(context.Context, *MatchObject) (*Result, error) // Call that manage communication of DGS connection info to players. // // Write the DGS connection info for the list of players in the // Assignments.roster to state storage, so that info can be read by the game // client(s). CreateAssignments(context.Context, *Assignments) (*Result, error) // Remove DGS connection info for the list of players in the Roster from // state storage. DeleteAssignments(context.Context, *Roster) (*Result, error) }
type API_ListMatchesClient ¶
type API_ListMatchesClient interface { Recv() (*MatchObject, error) grpc.ClientStream }
type API_ListMatchesServer ¶
type API_ListMatchesServer interface { Send(*MatchObject) error grpc.ServerStream }
type Assignments ¶
type Assignments struct { Roster *Roster `protobuf:"bytes,1,opt,name=roster" json:"roster,omitempty"` ConnectionInfo *ConnectionInfo `protobuf:"bytes,2,opt,name=connection_info,json=connectionInfo" json:"connection_info,omitempty"` }
func (*Assignments) Descriptor ¶
func (*Assignments) Descriptor() ([]byte, []int)
func (*Assignments) GetConnectionInfo ¶
func (m *Assignments) GetConnectionInfo() *ConnectionInfo
func (*Assignments) GetRoster ¶
func (m *Assignments) GetRoster() *Roster
func (*Assignments) ProtoMessage ¶
func (*Assignments) ProtoMessage()
func (*Assignments) Reset ¶
func (m *Assignments) Reset()
func (*Assignments) String ¶
func (m *Assignments) String() string
type ConnectionInfo ¶
type ConnectionInfo struct {
ConnectionString string `protobuf:"bytes,1,opt,name=connection_string,json=connectionString" json:"connection_string,omitempty"`
}
Simple message used to pass the connection string for the DGS to the player.
func (*ConnectionInfo) Descriptor ¶
func (*ConnectionInfo) Descriptor() ([]byte, []int)
func (*ConnectionInfo) GetConnectionString ¶
func (m *ConnectionInfo) GetConnectionString() string
func (*ConnectionInfo) ProtoMessage ¶
func (*ConnectionInfo) ProtoMessage()
func (*ConnectionInfo) Reset ¶
func (m *ConnectionInfo) Reset()
func (*ConnectionInfo) String ¶
func (m *ConnectionInfo) String() string
type MatchObject ¶
type MatchObject struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Properties string `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"` }
Data structure for all the properties of a match.
func (*MatchObject) Descriptor ¶
func (*MatchObject) Descriptor() ([]byte, []int)
func (*MatchObject) GetId ¶
func (m *MatchObject) GetId() string
func (*MatchObject) GetProperties ¶
func (m *MatchObject) GetProperties() string
func (*MatchObject) ProtoMessage ¶
func (*MatchObject) ProtoMessage()
func (*MatchObject) Reset ¶
func (m *MatchObject) Reset()
func (*MatchObject) String ¶
func (m *MatchObject) String() string
type Profile ¶
type Profile struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Properties string `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"` }
Data structure for a profile to pass to the matchmaking function.
func (*Profile) Descriptor ¶
func (*Profile) GetProperties ¶
func (*Profile) ProtoMessage ¶
func (*Profile) ProtoMessage()
type Result ¶
type Result struct { Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` }
Simple message to return success/failure and error status.
func (*Result) Descriptor ¶
func (*Result) GetSuccess ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type Roster ¶
type Roster struct {
PlayerIds string `protobuf:"bytes,1,opt,name=player_ids,json=playerIds" json:"player_ids,omitempty"`
}
Data structure to hold a list of players in a match.
func (*Roster) Descriptor ¶
func (*Roster) GetPlayerIds ¶
func (*Roster) ProtoMessage ¶
func (*Roster) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.