services

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 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{}

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
}

Room server

func (*Room) CallLog

func (*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() error

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