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 Roster Filter Stats PlayerPool Player Result IlInput Timestamp ConnectionInfo Assignments
backend is a package compiled from the protobuffer in <REPO_ROOT>/api/protobuf-spec/backend.proto. It is auto-generated and shouldn't be edited.
Index ¶
- func RegisterAPIServer(s *grpc.Server, srv APIServer)
- type APIClient
- type APIServer
- type API_ListMatchesClient
- type API_ListMatchesServer
- type Assignments
- 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 IlInput
- type MatchObject
- func (*MatchObject) Descriptor() ([]byte, []int)
- 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 Player
- 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 Profile
- type Result
- type Roster
- type Stats
- type Timestamp
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 for communication of connection info to players. // // Write the connection info for the list of players in the // Assignments.Rosters to state storage. The FrontendAPI is responsible for // sending anything written here to the game clients. // TODO: change this to be agnostic; return a 'result' instead of a connection // string so it can be integrated with session service etc CreateAssignments(ctx context.Context, in *Assignments, opts ...grpc.CallOption) (*Result, error) // Remove DGS connection info from state storage for all players in the Roster. 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 for communication of connection info to players. // // Write the connection info for the list of players in the // Assignments.Rosters to state storage. The FrontendAPI is responsible for // sending anything written here to the game clients. // TODO: change this to be agnostic; return a 'result' instead of a connection // string so it can be integrated with session service etc CreateAssignments(context.Context, *Assignments) (*Result, error) // Remove DGS connection info from state storage for all players in the Roster. 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 { 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 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 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 filter to apply to the player pool.
func (*Filter) Descriptor ¶
func (*Filter) GetAttribute ¶
func (*Filter) ProtoMessage ¶
func (*Filter) 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"` Rosters []*Roster `protobuf:"bytes,3,rep,name=rosters" json:"rosters,omitempty"` Pools []*PlayerPool `protobuf:"bytes,4,rep,name=pools" json:"pools,omitempty"` }
A MMF takes the Profile object above, and generates a MatchObject.
func (*MatchObject) Descriptor ¶
func (*MatchObject) Descriptor() ([]byte, []int)
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 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 for a profile to pass to the matchmaking function.
func (*Player) Descriptor ¶
func (*Player) GetAttributes ¶
func (m *Player) GetAttributes() []*Player_Attribute
func (*Player) GetProperties ¶
func (*Player) ProtoMessage ¶
func (*Player) 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"` }
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 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"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` // When you send a Profile to the backendAPI, it looks to see if you populated // this field with protobuf-encoded PlayerPool objects containing valid the filters // objects. If you did, they are used by OM. If you didn't, the backendAPI // next looks in your properties blob at the key specified in the 'jsonkeys.pools' // config value from config/matchmaker_config.json - If it finds valid player // pool definitions at that key, it will try to unmarshal them into this field. // If you didn't specify valid player pools in either place, OM assumes you // know what you're doing and just leaves this unpopulatd. Pools []*PlayerPool `protobuf:"bytes,4,rep,name=pools" json:"pools,omitempty"` }
func (*Profile) Descriptor ¶
func (*Profile) GetPools ¶
func (m *Profile) GetPools() []*PlayerPool
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 { 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"` }
func (*Stats) Descriptor ¶
func (*Stats) GetElapsed ¶
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
type Timestamp ¶
type Timestamp struct {
Ts int64 `protobuf:"varint,1,opt,name=ts" json:"ts,omitempty"`
}
Epoch timestamp in seconds.
func (*Timestamp) Descriptor ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()