services

package
v2.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metagame

type Metagame struct {
	component.Base
}

Metagame server

func (*Metagame) LogRemote

func (m *Metagame) LogRemote(ctx context.Context, arg *protos.Arg) (*protos.Response, error)

LogRemote logs argument when called

type RPCJob

type RPCJob struct {
	// contains filtered or unexported fields
}

RPCJob implements worker.RPCJob

func (*RPCJob) GetArgReply

func (r *RPCJob) GetArgReply(
	route string,
) (arg, reply proto.Message, err error)

GetArgReply returns reply and arg of LogRemote, since we have no other methods in this example

func (*RPCJob) RPC

func (r *RPCJob) RPC(
	ctx context.Context,
	serverID, routeStr string,
	reply, arg proto.Message,
) error

RPC calls pitaya's rpc

func (*RPCJob) ServerDiscovery

func (r *RPCJob) ServerDiscovery(
	route string,
	rpcMetadata map[string]interface{},
) (serverID string, err error)

ServerDiscovery returns a serverID="", meaning any server is ok

type Room

type Room struct {
	component.Base
	// contains filtered or unexported fields
}

Room server

func NewRoom

func NewRoom(app pitaya.Pitaya) *Room

NewRoom ctor

func (*Room) CallLog

func (r *Room) CallLog(ctx context.Context, arg *protos.Arg) (*protos.Response, error)

CallLog makes ReliableRPC to metagame LogRemote

type Worker

type Worker struct {
	component.Base
}

Worker server

func (*Worker) Configure

func (w *Worker) Configure(app pitaya.Pitaya)

Configure starts workers and register rpc job

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL