Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
api/protobuf-spec/backend.proto api/protobuf-spec/frontend.proto api/protobuf-spec/mmlogic.proto api/protobuf-spec/messages.proto
It has these top-level messages:
Group PlayerId MatchObject Roster Filter Stats PlayerPool Player Result IlInput ConnectionInfo Assignments
Index ¶
- func RegisterBackendServer(s *grpc.Server, srv BackendServer)
- func RegisterFrontendServer(s *grpc.Server, srv FrontendServer)
- func RegisterMmLogicServer(s *grpc.Server, srv MmLogicServer)
- type Assignments
- type BackendClient
- type BackendServer
- type Backend_ListMatchesClient
- type Backend_ListMatchesServer
- type ConnectionInfo
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)
- func (m *Filter) GetAttribute() string
- func (m *Filter) GetMaxv() int64
- func (m *Filter) GetMinv() int64
- func (m *Filter) GetName() string
- func (m *Filter) GetStats() *Stats
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) String() string
- type FrontendClient
- type FrontendServer
- type Group
- type IlInput
- type MatchObject
- func (*MatchObject) Descriptor() ([]byte, []int)
- func (m *MatchObject) GetError() string
- func (m *MatchObject) GetId() string
- func (m *MatchObject) GetPools() []*PlayerPool
- func (m *MatchObject) GetProperties() string
- func (m *MatchObject) GetRosters() []*Roster
- func (*MatchObject) ProtoMessage()
- func (m *MatchObject) Reset()
- func (m *MatchObject) String() string
- type MmLogicClient
- type MmLogicServer
- type MmLogic_GetPlayerPoolClient
- type MmLogic_GetPlayerPoolServer
- type Player
- type PlayerId
- type PlayerPool
- func (*PlayerPool) Descriptor() ([]byte, []int)
- func (m *PlayerPool) GetFilters() []*Filter
- func (m *PlayerPool) GetName() string
- func (m *PlayerPool) GetRoster() *Roster
- func (m *PlayerPool) GetStats() *Stats
- func (*PlayerPool) ProtoMessage()
- func (m *PlayerPool) Reset()
- func (m *PlayerPool) String() string
- type Player_Attribute
- type Result
- type Roster
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBackendServer ¶
func RegisterBackendServer(s *grpc.Server, srv BackendServer)
func RegisterFrontendServer ¶
func RegisterFrontendServer(s *grpc.Server, srv FrontendServer)
func RegisterMmLogicServer ¶
func RegisterMmLogicServer(s *grpc.Server, srv MmLogicServer)
Types ¶
type Assignments ¶
type Assignments struct { Rosters []*Roster `protobuf:"bytes,1,rep,name=rosters" json:"rosters,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) GetRosters ¶
func (m *Assignments) GetRosters() []*Roster
func (*Assignments) ProtoMessage ¶
func (*Assignments) ProtoMessage()
func (*Assignments) Reset ¶
func (m *Assignments) Reset()
func (*Assignments) String ¶
func (m *Assignments) String() string
type BackendClient ¶
type BackendClient interface { // Run MMF once. Return a matchobject that fits this profile. // INPUT: MatchObject message with these fields populated: // - id // - properties // - [optional] roster, any fields you fill are available to your MMF. // - [optional] pools, any fields you fill are available to your MMF. // OUTPUT: MatchObject message with these fields populated: // - id // - properties // - error. Empty if no error was encountered // - rosters, if you choose to fill them in your MMF. (Recommended) // - pools, if you used the MMLogicAPI in your MMF. (Recommended, and provides stats) CreateMatch(ctx context.Context, in *MatchObject, opts ...grpc.CallOption) (*MatchObject, error) // Continually run MMF and stream matchobjects that fit this profile until // client closes the connection. Same inputs/outputs as CreateMatch. ListMatches(ctx context.Context, in *MatchObject, opts ...grpc.CallOption) (Backend_ListMatchesClient, error) // Delete a matchobject from state storage manually. (Matchobjects in state // storage will also automatically expire after a while) // INPUT: MatchObject message with the 'id' field populated. // (All other fields are ignored.) DeleteMatch(ctx context.Context, in *MatchObject, opts ...grpc.CallOption) (*Result, error) // Write the connection info for the list of players in the // Assignments.messages.Rosters to state storage. The FrontendAPI is // responsible for sending anything sent here to the game clients. // Sending a player to this function kicks off a process that removes // the player from future matchmaking functions by adding them to the // 'deindexed' player list and then deleting their player ID from state storage // indexes. // INPUT: Assignments message with these fields populated: // - connection_info, anything you write to this string is sent to Frontend API // - rosters. You can send any number of rosters, containing any number of // player messages. All players from all rosters will be sent the connection_info. // The only field in the Player object that is used by CreateAssignments is // the id field. All others are silently ignored. CreateAssignments(ctx context.Context, in *Assignments, opts ...grpc.CallOption) (*Result, error) // Remove DGS connection info from state storage for players. // INPUT: Roster message with the 'players' field populated. // The only field in the Player object that is used by // DeleteAssignments is the 'id' field. All others are silently ignored. If // you need to delete multiple rosters, make multiple calls. DeleteAssignments(ctx context.Context, in *Roster, opts ...grpc.CallOption) (*Result, error) }
func NewBackendClient ¶
func NewBackendClient(cc *grpc.ClientConn) BackendClient
type BackendServer ¶
type BackendServer interface { // Run MMF once. Return a matchobject that fits this profile. // INPUT: MatchObject message with these fields populated: // - id // - properties // - [optional] roster, any fields you fill are available to your MMF. // - [optional] pools, any fields you fill are available to your MMF. // OUTPUT: MatchObject message with these fields populated: // - id // - properties // - error. Empty if no error was encountered // - rosters, if you choose to fill them in your MMF. (Recommended) // - pools, if you used the MMLogicAPI in your MMF. (Recommended, and provides stats) CreateMatch(context.Context, *MatchObject) (*MatchObject, error) // Continually run MMF and stream matchobjects that fit this profile until // client closes the connection. Same inputs/outputs as CreateMatch. ListMatches(*MatchObject, Backend_ListMatchesServer) error // Delete a matchobject from state storage manually. (Matchobjects in state // storage will also automatically expire after a while) // INPUT: MatchObject message with the 'id' field populated. // (All other fields are ignored.) DeleteMatch(context.Context, *MatchObject) (*Result, error) // Write the connection info for the list of players in the // Assignments.messages.Rosters to state storage. The FrontendAPI is // responsible for sending anything sent here to the game clients. // Sending a player to this function kicks off a process that removes // the player from future matchmaking functions by adding them to the // 'deindexed' player list and then deleting their player ID from state storage // indexes. // INPUT: Assignments message with these fields populated: // - connection_info, anything you write to this string is sent to Frontend API // - rosters. You can send any number of rosters, containing any number of // player messages. All players from all rosters will be sent the connection_info. // The only field in the Player object that is used by CreateAssignments is // the id field. All others are silently ignored. CreateAssignments(context.Context, *Assignments) (*Result, error) // Remove DGS connection info from state storage for players. // INPUT: Roster message with the 'players' field populated. // The only field in the Player object that is used by // DeleteAssignments is the 'id' field. All others are silently ignored. If // you need to delete multiple rosters, make multiple calls. DeleteAssignments(context.Context, *Roster) (*Result, error) }
type Backend_ListMatchesClient ¶
type Backend_ListMatchesClient interface { Recv() (*MatchObject, error) grpc.ClientStream }
type Backend_ListMatchesServer ¶
type Backend_ListMatchesServer interface { Send(*MatchObject) error grpc.ServerStream }
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. DEPRECATED: Likely to be integrated into another protobuf message in a future version.
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 Filter ¶
type Filter struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Attribute string `protobuf:"bytes,2,opt,name=attribute" json:"attribute,omitempty"` Maxv int64 `protobuf:"varint,3,opt,name=maxv" json:"maxv,omitempty"` Minv int64 `protobuf:"varint,4,opt,name=minv" json:"minv,omitempty"` Stats *Stats `protobuf:"bytes,5,opt,name=stats" json:"stats,omitempty"` }
A 'hard' filter to apply to the player pool.
func (*Filter) Descriptor ¶
func (*Filter) GetAttribute ¶
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
type FrontendClient ¶
type FrontendClient interface { CreateRequest(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Result, error) DeleteRequest(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Result, error) GetAssignment(ctx context.Context, in *PlayerId, opts ...grpc.CallOption) (*ConnectionInfo, error) DeleteAssignment(ctx context.Context, in *PlayerId, opts ...grpc.CallOption) (*Result, error) }
func NewFrontendClient ¶
func NewFrontendClient(cc *grpc.ClientConn) FrontendClient
type FrontendServer ¶
type Group ¶
type Group 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 group of players to pass to the matchmaking function. Obviously, the group can be a group of one!
func (*Group) Descriptor ¶
func (*Group) GetProperties ¶
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
type IlInput ¶
type IlInput struct { }
IlInput is an empty message reserved for future use.
func (*IlInput) Descriptor ¶
func (*IlInput) ProtoMessage ¶
func (*IlInput) ProtoMessage()
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"` Error string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"` Rosters []*Roster `protobuf:"bytes,4,rep,name=rosters" json:"rosters,omitempty"` Pools []*PlayerPool `protobuf:"bytes,5,rep,name=pools" json:"pools,omitempty"` }
Open Match's internal representation and wire protocol format for "MatchObjects". In order to request a match using the Backend API, your backend code should generate a new MatchObject with an ID and properties filled in (for more details about valid values for these fields, see the documentation). Open Match then sends the Match Object through to your matchmaking function, where you add players to 'rosters' and store any schemaless data you wish in the 'properties' field. The MatchObject is then sent, populated, out through the Backend API to your backend code.
MatchObjects contain a number of fields, but many gRPC calls that take a MatchObject as input only require a few of them to be filled in. Check the gRPC function in question for more details.
func (*MatchObject) Descriptor ¶
func (*MatchObject) Descriptor() ([]byte, []int)
func (*MatchObject) GetError ¶
func (m *MatchObject) GetError() string
func (*MatchObject) GetId ¶
func (m *MatchObject) GetId() string
func (*MatchObject) GetPools ¶
func (m *MatchObject) GetPools() []*PlayerPool
func (*MatchObject) GetProperties ¶
func (m *MatchObject) GetProperties() string
func (*MatchObject) GetRosters ¶
func (m *MatchObject) GetRosters() []*Roster
func (*MatchObject) ProtoMessage ¶
func (*MatchObject) ProtoMessage()
func (*MatchObject) Reset ¶
func (m *MatchObject) Reset()
func (*MatchObject) String ¶
func (m *MatchObject) String() string
type MmLogicClient ¶
type MmLogicClient interface { // Send GetProfile a match object with the ID field populated, it will return a // 'filled' one. // Note: filters are assumed to have been checked for validity by the // backendapi when accepting a profile GetProfile(ctx context.Context, in *MatchObject, opts ...grpc.CallOption) (*MatchObject, error) // CreateProposal is called by MMFs that wish to write their results to // a proposed MatchObject, that can be sent out the Backend API once it has // been approved (by default, by the evaluator process). // - adds all players in all Rosters to the proposed player ignore list // - writes the proposed match to the provided key // - adds that key to the list of proposals to be considered // INPUT: // * TO RETURN A MATCHOBJECT AFTER A SUCCESSFUL MMF RUN // To create a match MatchObject message with these fields populated: // - id, set to the value of the MMF_PROPOSAL_ID env var // - properties // - error. You must explicitly set this to an empty string if your MMF // - roster, with the playerIDs filled in the 'players' repeated field. // - [optional] pools, set to the output from the 'GetPlayerPools' call, // will populate the pools with stats about how many players the filters // matched and how long the filters took to run, which will be sent out // the backend api along with your match results. // was successful. // * TO RETURN AN ERROR // To report a failure or error, send a MatchObject message with these // these fields populated: // - id, set to the value of the MMF_ERROR_ID env var. // - error, set to a string value describing the error your MMF encountered. // - [optional] properties, anything you put here is returned to the // backend along with your error. // - [optional] rosters, anything you put here is returned to the // backend along with your error. // - [optional] pools, set to the output from the 'GetPlayerPools' call, // will populate the pools with stats about how many players the filters // matched and how long the filters took to run, which will be sent out // the backend api along with your match results. // OUTPUT: a Result message with a boolean success value and an error string // if an error was encountered CreateProposal(ctx context.Context, in *MatchObject, opts ...grpc.CallOption) (*Result, error) // Player listing and filtering functions // // RetrievePlayerPool gets the list of players that match every Filter in the // PlayerPool, and then removes all players it finds in the ignore list. It // combines the results, and returns the resulting player pool. GetPlayerPool(ctx context.Context, in *PlayerPool, opts ...grpc.CallOption) (MmLogic_GetPlayerPoolClient, error) // Ignore List functions // // IlInput is an empty message reserved for future use. GetAllIgnoredPlayers(ctx context.Context, in *IlInput, opts ...grpc.CallOption) (*Roster, error) // RetrieveIgnoreList retrieves players from the ignore list specified in the // config file under 'ignoreLists.proposedPlayers.key'. ListIgnoredPlayers(ctx context.Context, in *IlInput, opts ...grpc.CallOption) (*Roster, error) }
func NewMmLogicClient ¶
func NewMmLogicClient(cc *grpc.ClientConn) MmLogicClient
type MmLogicServer ¶
type MmLogicServer interface { // Send GetProfile a match object with the ID field populated, it will return a // 'filled' one. // Note: filters are assumed to have been checked for validity by the // backendapi when accepting a profile GetProfile(context.Context, *MatchObject) (*MatchObject, error) // CreateProposal is called by MMFs that wish to write their results to // a proposed MatchObject, that can be sent out the Backend API once it has // been approved (by default, by the evaluator process). // - adds all players in all Rosters to the proposed player ignore list // - writes the proposed match to the provided key // - adds that key to the list of proposals to be considered // INPUT: // * TO RETURN A MATCHOBJECT AFTER A SUCCESSFUL MMF RUN // To create a match MatchObject message with these fields populated: // - id, set to the value of the MMF_PROPOSAL_ID env var // - properties // - error. You must explicitly set this to an empty string if your MMF // - roster, with the playerIDs filled in the 'players' repeated field. // - [optional] pools, set to the output from the 'GetPlayerPools' call, // will populate the pools with stats about how many players the filters // matched and how long the filters took to run, which will be sent out // the backend api along with your match results. // was successful. // * TO RETURN AN ERROR // To report a failure or error, send a MatchObject message with these // these fields populated: // - id, set to the value of the MMF_ERROR_ID env var. // - error, set to a string value describing the error your MMF encountered. // - [optional] properties, anything you put here is returned to the // backend along with your error. // - [optional] rosters, anything you put here is returned to the // backend along with your error. // - [optional] pools, set to the output from the 'GetPlayerPools' call, // will populate the pools with stats about how many players the filters // matched and how long the filters took to run, which will be sent out // the backend api along with your match results. // OUTPUT: a Result message with a boolean success value and an error string // if an error was encountered CreateProposal(context.Context, *MatchObject) (*Result, error) // Player listing and filtering functions // // RetrievePlayerPool gets the list of players that match every Filter in the // PlayerPool, and then removes all players it finds in the ignore list. It // combines the results, and returns the resulting player pool. GetPlayerPool(*PlayerPool, MmLogic_GetPlayerPoolServer) error // Ignore List functions // // IlInput is an empty message reserved for future use. GetAllIgnoredPlayers(context.Context, *IlInput) (*Roster, error) // RetrieveIgnoreList retrieves players from the ignore list specified in the // config file under 'ignoreLists.proposedPlayers.key'. ListIgnoredPlayers(context.Context, *IlInput) (*Roster, error) }
type MmLogic_GetPlayerPoolClient ¶
type MmLogic_GetPlayerPoolClient interface { Recv() (*PlayerPool, error) grpc.ClientStream }
type MmLogic_GetPlayerPoolServer ¶
type MmLogic_GetPlayerPoolServer interface { Send(*PlayerPool) error grpc.ServerStream }
type Player ¶
type Player struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Properties string `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"` Pool string `protobuf:"bytes,3,opt,name=pool" json:"pool,omitempty"` Attributes []*Player_Attribute `protobuf:"bytes,4,rep,name=attributes" json:"attributes,omitempty"` }
Data structure to hold details about a player
func (*Player) Descriptor ¶
func (*Player) GetAttributes ¶
func (m *Player) GetAttributes() []*Player_Attribute
func (*Player) GetProperties ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
type PlayerId ¶
type PlayerId struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*PlayerId) Descriptor ¶
func (*PlayerId) ProtoMessage ¶
func (*PlayerId) ProtoMessage()
type PlayerPool ¶
type PlayerPool struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Filters []*Filter `protobuf:"bytes,2,rep,name=filters" json:"filters,omitempty"` Roster *Roster `protobuf:"bytes,3,opt,name=roster" json:"roster,omitempty"` Stats *Stats `protobuf:"bytes,4,opt,name=stats" json:"stats,omitempty"` }
PlayerPools are defined by a set of 'hard' filters, and can be filled in with the players that match those filters.
PlayerPools contain a number of fields, but many gRPC calls that take a PlayerPool as input only require a few of them to be filled in. Check the gRPC function in question for more details.
func (*PlayerPool) Descriptor ¶
func (*PlayerPool) Descriptor() ([]byte, []int)
func (*PlayerPool) GetFilters ¶
func (m *PlayerPool) GetFilters() []*Filter
func (*PlayerPool) GetName ¶
func (m *PlayerPool) GetName() string
func (*PlayerPool) GetRoster ¶
func (m *PlayerPool) GetRoster() *Roster
func (*PlayerPool) GetStats ¶
func (m *PlayerPool) GetStats() *Stats
func (*PlayerPool) ProtoMessage ¶
func (*PlayerPool) ProtoMessage()
func (*PlayerPool) Reset ¶
func (m *PlayerPool) Reset()
func (*PlayerPool) String ¶
func (m *PlayerPool) String() string
type Player_Attribute ¶
type Player_Attribute struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value int64 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"` }
func (*Player_Attribute) Descriptor ¶
func (*Player_Attribute) Descriptor() ([]byte, []int)
func (*Player_Attribute) GetName ¶
func (m *Player_Attribute) GetName() string
func (*Player_Attribute) GetValue ¶
func (m *Player_Attribute) GetValue() int64
func (*Player_Attribute) ProtoMessage ¶
func (*Player_Attribute) ProtoMessage()
func (*Player_Attribute) Reset ¶
func (m *Player_Attribute) Reset()
func (*Player_Attribute) String ¶
func (m *Player_Attribute) String() string
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 { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Players []*Player `protobuf:"bytes,2,rep,name=players" json:"players,omitempty"` }
Data structure to hold a list of players in a match.
func (*Roster) Descriptor ¶
func (*Roster) GetPlayers ¶
func (*Roster) ProtoMessage ¶
func (*Roster) ProtoMessage()
type Stats ¶
type Stats struct { Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` Elapsed float64 `protobuf:"fixed64,2,opt,name=elapsed" json:"elapsed,omitempty"` }
Holds statistics
func (*Stats) Descriptor ¶
func (*Stats) GetElapsed ¶
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()