Documentation
¶
Index ¶
- func RegisterBackendServer(s *grpc.Server, srv BackendServer)
- func RegisterFrontendServer(s *grpc.Server, srv FrontendServer)
- func RegisterFunctionServer(s *grpc.Server, srv FunctionServer)
- func RegisterMmLogicServer(s *grpc.Server, srv MmLogicServer)
- type Arguments
- func (*Arguments) Descriptor() ([]byte, []int)
- func (m *Arguments) GetMatchobject() *MatchObject
- func (m *Arguments) GetRequest() *Request
- func (*Arguments) ProtoMessage()
- func (m *Arguments) Reset()
- func (m *Arguments) String() string
- func (m *Arguments) XXX_DiscardUnknown()
- func (m *Arguments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Arguments) XXX_Merge(src proto.Message)
- func (m *Arguments) XXX_Size() int
- func (m *Arguments) XXX_Unmarshal(b []byte) error
- type Assignments
- func (*Assignments) Descriptor() ([]byte, []int)
- func (m *Assignments) GetAssignment() string
- func (m *Assignments) GetRosters() []*Roster
- func (*Assignments) ProtoMessage()
- func (m *Assignments) Reset()
- func (m *Assignments) String() string
- func (m *Assignments) XXX_DiscardUnknown()
- func (m *Assignments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Assignments) XXX_Merge(src proto.Message)
- func (m *Assignments) XXX_Size() int
- func (m *Assignments) XXX_Unmarshal(b []byte) error
- type BackendClient
- type BackendServer
- type Backend_ListMatchesClient
- type Backend_ListMatchesServer
- 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
- func (m *Filter) XXX_DiscardUnknown()
- func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Filter) XXX_Merge(src proto.Message)
- func (m *Filter) XXX_Size() int
- func (m *Filter) XXX_Unmarshal(b []byte) error
- type FrontendClient
- type FrontendServer
- type Frontend_GetUpdatesClient
- type Frontend_GetUpdatesServer
- type FunctionClient
- type FunctionServer
- type IlInput
- func (*IlInput) Descriptor() ([]byte, []int)
- func (*IlInput) ProtoMessage()
- func (m *IlInput) Reset()
- func (m *IlInput) String() string
- func (m *IlInput) XXX_DiscardUnknown()
- func (m *IlInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IlInput) XXX_Merge(src proto.Message)
- func (m *IlInput) XXX_Size() int
- func (m *IlInput) XXX_Unmarshal(b []byte) error
- 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 (m *MatchObject) GetStatus() string
- func (*MatchObject) ProtoMessage()
- func (m *MatchObject) Reset()
- func (m *MatchObject) String() string
- func (m *MatchObject) XXX_DiscardUnknown()
- func (m *MatchObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MatchObject) XXX_Merge(src proto.Message)
- func (m *MatchObject) XXX_Size() int
- func (m *MatchObject) XXX_Unmarshal(b []byte) error
- type MmLogicClient
- type MmLogicServer
- type MmLogic_GetPlayerPoolClient
- type MmLogic_GetPlayerPoolServer
- type Player
- func (*Player) Descriptor() ([]byte, []int)
- func (m *Player) GetAssignment() string
- func (m *Player) GetAttributes() []*Player_Attribute
- func (m *Player) GetError() string
- func (m *Player) GetId() string
- func (m *Player) GetPool() string
- func (m *Player) GetProperties() string
- func (m *Player) GetStatus() string
- func (*Player) ProtoMessage()
- func (m *Player) Reset()
- func (m *Player) String() string
- func (m *Player) XXX_DiscardUnknown()
- func (m *Player) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Player) XXX_Merge(src proto.Message)
- func (m *Player) XXX_Size() int
- func (m *Player) XXX_Unmarshal(b []byte) error
- 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
- func (m *PlayerPool) XXX_DiscardUnknown()
- func (m *PlayerPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PlayerPool) XXX_Merge(src proto.Message)
- func (m *PlayerPool) XXX_Size() int
- func (m *PlayerPool) XXX_Unmarshal(b []byte) error
- type Player_Attribute
- func (*Player_Attribute) Descriptor() ([]byte, []int)
- func (m *Player_Attribute) GetName() string
- func (m *Player_Attribute) GetValue() int64
- func (*Player_Attribute) ProtoMessage()
- func (m *Player_Attribute) Reset()
- func (m *Player_Attribute) String() string
- func (m *Player_Attribute) XXX_DiscardUnknown()
- func (m *Player_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Player_Attribute) XXX_Merge(src proto.Message)
- func (m *Player_Attribute) XXX_Size() int
- func (m *Player_Attribute) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetErrorId() string
- func (m *Request) GetProfileId() string
- func (m *Request) GetProposalId() string
- func (m *Request) GetRequestId() string
- func (m *Request) GetTimestamp() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetError() string
- func (m *Result) GetSuccess() bool
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type Roster
- func (*Roster) Descriptor() ([]byte, []int)
- func (m *Roster) GetName() string
- func (m *Roster) GetPlayers() []*Player
- func (*Roster) ProtoMessage()
- func (m *Roster) Reset()
- func (m *Roster) String() string
- func (m *Roster) XXX_DiscardUnknown()
- func (m *Roster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Roster) XXX_Merge(src proto.Message)
- func (m *Roster) XXX_Size() int
- func (m *Roster) XXX_Unmarshal(b []byte) error
- type Stats
- func (*Stats) Descriptor() ([]byte, []int)
- func (m *Stats) GetCount() int64
- func (m *Stats) GetElapsed() float64
- func (*Stats) ProtoMessage()
- func (m *Stats) Reset()
- func (m *Stats) String() string
- func (m *Stats) XXX_DiscardUnknown()
- func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stats) XXX_Merge(src proto.Message)
- func (m *Stats) XXX_Size() int
- func (m *Stats) XXX_Unmarshal(b []byte) error
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 RegisterFunctionServer ¶
func RegisterFunctionServer(s *grpc.Server, srv FunctionServer)
func RegisterMmLogicServer ¶
func RegisterMmLogicServer(s *grpc.Server, srv MmLogicServer)
Types ¶
type Arguments ¶
type Arguments struct { Request *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` Matchobject *MatchObject `protobuf:"bytes,2,opt,name=matchobject,proto3" json:"matchobject,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The message for passing all the necessary arguments to a matchmaking function.
func (*Arguments) Descriptor ¶
func (*Arguments) GetMatchobject ¶
func (m *Arguments) GetMatchobject() *MatchObject
func (*Arguments) GetRequest ¶
func (*Arguments) ProtoMessage ¶
func (*Arguments) ProtoMessage()
func (*Arguments) XXX_DiscardUnknown ¶
func (m *Arguments) XXX_DiscardUnknown()
func (*Arguments) XXX_Marshal ¶
func (*Arguments) XXX_Unmarshal ¶
type Assignments ¶
type Assignments struct { Rosters []*Roster `protobuf:"bytes,1,rep,name=rosters,proto3" json:"rosters,omitempty"` Assignment string `protobuf:"bytes,10,opt,name=assignment,proto3" json:"assignment,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Assignments) Descriptor ¶
func (*Assignments) Descriptor() ([]byte, []int)
func (*Assignments) GetAssignment ¶
func (m *Assignments) GetAssignment() string
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
func (*Assignments) XXX_DiscardUnknown ¶
func (m *Assignments) XXX_DiscardUnknown()
func (*Assignments) XXX_Marshal ¶
func (m *Assignments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Assignments) XXX_Merge ¶
func (m *Assignments) XXX_Merge(src proto.Message)
func (*Assignments) XXX_Size ¶
func (m *Assignments) XXX_Size() int
func (*Assignments) XXX_Unmarshal ¶
func (m *Assignments) XXX_Unmarshal(b []byte) error
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 // the backend 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, defined in the config) // 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 Frontend API 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: // - assignment, 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 assignment. // The only field in the Roster's Player messages used by CreateAssignments is // the id field. All other fields in the Player messages 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 Roster's Player messages 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) }
BackendClient is the client API for Backend service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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 // the backend 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, defined in the config) // 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 Frontend API 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: // - assignment, 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 assignment. // The only field in the Roster's Player messages used by CreateAssignments is // the id field. All other fields in the Player messages 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 Roster's Player messages 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) }
BackendServer is the server API for Backend service.
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 Filter ¶
type Filter struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Attribute string `protobuf:"bytes,2,opt,name=attribute,proto3" json:"attribute,omitempty"` Maxv int64 `protobuf:"varint,3,opt,name=maxv,proto3" json:"maxv,omitempty"` Minv int64 `protobuf:"varint,4,opt,name=minv,proto3" json:"minv,omitempty"` Stats *Stats `protobuf:"bytes,5,opt,name=stats,proto3" json:"stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A 'hard' filter to apply to the player pool.
func (*Filter) Descriptor ¶
func (*Filter) GetAttribute ¶
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) XXX_DiscardUnknown ¶
func (m *Filter) XXX_DiscardUnknown()
func (*Filter) XXX_Marshal ¶
func (*Filter) XXX_Unmarshal ¶
type FrontendClient ¶
type FrontendClient interface { // CreatePlayer will put the player in state storage, and then look // through the 'properties' field for the attributes you have defined as // indices your matchmaker config. If the attributes exist and are valid // integers, they will be indexed. // INPUT: Player message with these fields populated: // - id // - properties // OUTPUT: Result message denoting success or failure (and an error if // necessary) CreatePlayer(ctx context.Context, in *Player, opts ...grpc.CallOption) (*Result, error) // DeletePlayer removes the player from state storage by doing the // following: // 1) Delete player from configured indices. This effectively removes the // player from matchmaking when using recommended MMF patterns. // Everything after this is just cleanup to save stage storage space. // 2) 'Lazily' delete the player's state storage record. This is kicked // off in the background and may take some time to complete. // 2) 'Lazily' delete the player's metadata indicies (like, the timestamp when // they called CreatePlayer, and the last time the record was accessed). This // is also kicked off in the background and may take some time to complete. // INPUT: Player message with the 'id' field populated. // OUTPUT: Result message denoting success or failure (and an error if // necessary) DeletePlayer(ctx context.Context, in *Player, opts ...grpc.CallOption) (*Result, error) // GetUpdates streams matchmaking results from Open Match for the // provided player ID. // INPUT: Player message with the 'id' field populated. // OUTPUT: a stream of player objects with one or more of the following // fields populated, if an update to that field is seen in state storage: // - 'assignment': string that usually contains game server connection information. // - 'status': string to communicate current matchmaking status to the client. // - 'error': string to pass along error information to the client. // // During normal operation, the expectation is that the 'assignment' field // will be updated by a Backend process calling the 'CreateAssignments' Backend API // endpoint. 'Status' and 'Error' are free for developers to use as they see fit. // Even if you had multiple players enter a matchmaking request as a group, the // Backend API 'CreateAssignments' call will write the results to state // storage separately under each player's ID. OM expects you to make all game // clients 'GetUpdates' with their own ID from the Frontend API to get // their results. // // NOTE: This call generates a small amount of load on the Frontend API and state // storage while watching the player record for updates. You are expected // to close the stream from your client after receiving your matchmaking // results (or a reasonable timeout), or you will continue to // generate load on OM until you do! // NOTE: Just bear in mind that every update will send egress traffic from // Open Match to game clients! Frugality is recommended. GetUpdates(ctx context.Context, in *Player, opts ...grpc.CallOption) (Frontend_GetUpdatesClient, error) }
FrontendClient is the client API for Frontend service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFrontendClient ¶
func NewFrontendClient(cc *grpc.ClientConn) FrontendClient
type FrontendServer ¶
type FrontendServer interface { // CreatePlayer will put the player in state storage, and then look // through the 'properties' field for the attributes you have defined as // indices your matchmaker config. If the attributes exist and are valid // integers, they will be indexed. // INPUT: Player message with these fields populated: // - id // - properties // OUTPUT: Result message denoting success or failure (and an error if // necessary) CreatePlayer(context.Context, *Player) (*Result, error) // DeletePlayer removes the player from state storage by doing the // following: // 1) Delete player from configured indices. This effectively removes the // player from matchmaking when using recommended MMF patterns. // Everything after this is just cleanup to save stage storage space. // 2) 'Lazily' delete the player's state storage record. This is kicked // off in the background and may take some time to complete. // 2) 'Lazily' delete the player's metadata indicies (like, the timestamp when // they called CreatePlayer, and the last time the record was accessed). This // is also kicked off in the background and may take some time to complete. // INPUT: Player message with the 'id' field populated. // OUTPUT: Result message denoting success or failure (and an error if // necessary) DeletePlayer(context.Context, *Player) (*Result, error) // GetUpdates streams matchmaking results from Open Match for the // provided player ID. // INPUT: Player message with the 'id' field populated. // OUTPUT: a stream of player objects with one or more of the following // fields populated, if an update to that field is seen in state storage: // - 'assignment': string that usually contains game server connection information. // - 'status': string to communicate current matchmaking status to the client. // - 'error': string to pass along error information to the client. // // During normal operation, the expectation is that the 'assignment' field // will be updated by a Backend process calling the 'CreateAssignments' Backend API // endpoint. 'Status' and 'Error' are free for developers to use as they see fit. // Even if you had multiple players enter a matchmaking request as a group, the // Backend API 'CreateAssignments' call will write the results to state // storage separately under each player's ID. OM expects you to make all game // clients 'GetUpdates' with their own ID from the Frontend API to get // their results. // // NOTE: This call generates a small amount of load on the Frontend API and state // storage while watching the player record for updates. You are expected // to close the stream from your client after receiving your matchmaking // results (or a reasonable timeout), or you will continue to // generate load on OM until you do! // NOTE: Just bear in mind that every update will send egress traffic from // Open Match to game clients! Frugality is recommended. GetUpdates(*Player, Frontend_GetUpdatesServer) error }
FrontendServer is the server API for Frontend service.
type Frontend_GetUpdatesClient ¶
type Frontend_GetUpdatesClient interface { Recv() (*Player, error) grpc.ClientStream }
type Frontend_GetUpdatesServer ¶
type Frontend_GetUpdatesServer interface { Send(*Player) error grpc.ServerStream }
type FunctionClient ¶
type FunctionClient interface { // The assumption is that there will be one service for each MMF that is // being served. Build your MMF in the appropriate serving harness, deploy it // to the K8s cluster with a unique service name, then connect to that service // and call 'Run()' to execute the fuction. Run(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Result, error) }
FunctionClient is the client API for Function service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFunctionClient ¶
func NewFunctionClient(cc *grpc.ClientConn) FunctionClient
type FunctionServer ¶
type FunctionServer interface { // The assumption is that there will be one service for each MMF that is // being served. Build your MMF in the appropriate serving harness, deploy it // to the K8s cluster with a unique service name, then connect to that service // and call 'Run()' to execute the fuction. Run(context.Context, *Arguments) (*Result, error) }
FunctionServer is the server API for Function service.
type IlInput ¶
type IlInput struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
IlInput is an empty message reserved for future use.
func (*IlInput) Descriptor ¶
func (*IlInput) ProtoMessage ¶
func (*IlInput) ProtoMessage()
func (*IlInput) XXX_DiscardUnknown ¶
func (m *IlInput) XXX_DiscardUnknown()
func (*IlInput) XXX_Marshal ¶
func (*IlInput) XXX_Unmarshal ¶
type MatchObject ¶
type MatchObject struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Properties string `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` Rosters []*Roster `protobuf:"bytes,4,rep,name=rosters,proto3" json:"rosters,omitempty"` Pools []*PlayerPool `protobuf:"bytes,5,rep,name=pools,proto3" json:"pools,omitempty"` Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) GetStatus ¶
func (m *MatchObject) GetStatus() string
func (*MatchObject) ProtoMessage ¶
func (*MatchObject) ProtoMessage()
func (*MatchObject) Reset ¶
func (m *MatchObject) Reset()
func (*MatchObject) String ¶
func (m *MatchObject) String() string
func (*MatchObject) XXX_DiscardUnknown ¶
func (m *MatchObject) XXX_DiscardUnknown()
func (*MatchObject) XXX_Marshal ¶
func (m *MatchObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchObject) XXX_Merge ¶
func (m *MatchObject) XXX_Merge(src proto.Message)
func (*MatchObject) XXX_Size ¶
func (m *MatchObject) XXX_Size() int
func (*MatchObject) XXX_Unmarshal ¶
func (m *MatchObject) XXX_Unmarshal(b []byte) error
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, .excluding players in any configured ignore lists. 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) // ListIgnoredPlayers retrieves players from the ignore list specified in the // config file under 'ignoreLists.proposed.name'. ListIgnoredPlayers(ctx context.Context, in *IlInput, opts ...grpc.CallOption) (*Roster, error) }
MmLogicClient is the client API for MmLogic service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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, .excluding players in any configured ignore lists. 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) // ListIgnoredPlayers retrieves players from the ignore list specified in the // config file under 'ignoreLists.proposed.name'. ListIgnoredPlayers(context.Context, *IlInput) (*Roster, error) }
MmLogicServer is the server API for MmLogic service.
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,proto3" json:"id,omitempty"` Properties string `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"` Pool string `protobuf:"bytes,3,opt,name=pool,proto3" json:"pool,omitempty"` Attributes []*Player_Attribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` Assignment string `protobuf:"bytes,5,opt,name=assignment,proto3" json:"assignment,omitempty"` Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Open Match's internal representation and wire protocol format for "Players". In order to enter matchmaking using the Frontend API, your client code should generate a consistent (same result for each client every time they launch) with an ID and properties filled in (for more details about valid values for these fields, see the documentation). Players contain a number of fields, but the gRPC calls that take a Player as input only require a few of them to be filled in. Check the gRPC function in question for more details.
func (*Player) Descriptor ¶
func (*Player) GetAssignment ¶
func (*Player) GetAttributes ¶
func (m *Player) GetAttributes() []*Player_Attribute
func (*Player) GetProperties ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) XXX_DiscardUnknown ¶
func (m *Player) XXX_DiscardUnknown()
func (*Player) XXX_Marshal ¶
func (*Player) XXX_Unmarshal ¶
type PlayerPool ¶
type PlayerPool struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Filters []*Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` Roster *Roster `protobuf:"bytes,3,opt,name=roster,proto3" json:"roster,omitempty"` Stats *Stats `protobuf:"bytes,4,opt,name=stats,proto3" json:"stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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
func (*PlayerPool) XXX_DiscardUnknown ¶
func (m *PlayerPool) XXX_DiscardUnknown()
func (*PlayerPool) XXX_Marshal ¶
func (m *PlayerPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PlayerPool) XXX_Merge ¶
func (m *PlayerPool) XXX_Merge(src proto.Message)
func (*PlayerPool) XXX_Size ¶
func (m *PlayerPool) XXX_Size() int
func (*PlayerPool) XXX_Unmarshal ¶
func (m *PlayerPool) XXX_Unmarshal(b []byte) error
type Player_Attribute ¶
type Player_Attribute struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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
func (*Player_Attribute) XXX_DiscardUnknown ¶
func (m *Player_Attribute) XXX_DiscardUnknown()
func (*Player_Attribute) XXX_Marshal ¶
func (m *Player_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Player_Attribute) XXX_Merge ¶
func (m *Player_Attribute) XXX_Merge(src proto.Message)
func (*Player_Attribute) XXX_Size ¶
func (m *Player_Attribute) XXX_Size() int
func (*Player_Attribute) XXX_Unmarshal ¶
func (m *Player_Attribute) XXX_Unmarshal(b []byte) error
type Request ¶
type Request struct { ProfileId string `protobuf:"bytes,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` ProposalId string `protobuf:"bytes,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` ErrorId string `protobuf:"bytes,4,opt,name=error_id,json=errorId,proto3" json:"error_id,omitempty"` Timestamp string `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The message for passing in the per-request identifiers to a matchmaking function; used so it knows which records to write/update in state storage.
func (*Request) Descriptor ¶
func (*Request) GetErrorId ¶
func (*Request) GetProfileId ¶
func (*Request) GetProposalId ¶
func (*Request) GetRequestId ¶
func (*Request) GetTimestamp ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Result ¶
type Result struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Simple message to return success/failure and error status.
func (*Result) Descriptor ¶
func (*Result) GetSuccess ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_Unmarshal ¶
type Roster ¶
type Roster struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Players []*Player `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Data structure to hold a list of players in a match.
func (*Roster) Descriptor ¶
func (*Roster) GetPlayers ¶
func (*Roster) ProtoMessage ¶
func (*Roster) ProtoMessage()
func (*Roster) XXX_DiscardUnknown ¶
func (m *Roster) XXX_DiscardUnknown()
func (*Roster) XXX_Marshal ¶
func (*Roster) XXX_Unmarshal ¶
type Stats ¶
type Stats struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Elapsed float64 `protobuf:"fixed64,2,opt,name=elapsed,proto3" json:"elapsed,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Holds statistics
func (*Stats) Descriptor ¶
func (*Stats) GetElapsed ¶
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
func (*Stats) XXX_DiscardUnknown ¶
func (m *Stats) XXX_DiscardUnknown()