agent

package
v0.0.0-...-620f6c9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSesionFromContext

func GetSesionFromContext(c context.Context) *session.Session

Types

type Agent

type Agent struct {
	Uuid       int64
	ErrorPipe  *ErrorPipe
	GameServer AgentToGameClient
}

func NewAgentRpc

func NewAgentRpc() (agent *Agent)

func (*Agent) AquireGameServer

func (a *Agent) AquireGameServer(c context.Context, e *Empty) (*ServerInfo, error)

allocate room

func (*Agent) AquireOtherAgent

func (a *Agent) AquireOtherAgent(c context.Context, e *Empty) (*ServerInfo, error)

func (*Agent) AquireSessionKey

func (a *Agent) AquireSessionKey(c context.Context, e *Empty) (*SessionKey, error)

func (*Agent) CreateAccount

func (a *Agent) CreateAccount(c context.Context, in *RegistInput) (*Error, error)

func (*Agent) CreateRoom

func (a *Agent) CreateRoom(c context.Context, roomSetting *RoomSetting) (*Success, error)

func (*Agent) GetSessionCache

func (a *Agent) GetSessionCache(c context.Context, e *Empty) (*SessionCache, error)

func (*Agent) Init

func (a *Agent) Init(ip, agentToGamePort, clientToGamePort string)

func (*Agent) JoinRoom

func (a *Agent) JoinRoom(c context.Context, id *ID) (*Success, error)

func (*Agent) Login

func (a *Agent) Login(c context.Context, in *LoginInput) (*UserInfo, error)

func (*Agent) Pipe

func (a *Agent) Pipe(ClientToAgent_PipeServer) error

rpc UpdateRoomInfo(SessionKey) returns (stream RoomInfoView) {}

func (*Agent) RoomReady

func (a *Agent) RoomReady(c context.Context, e *Empty) (*Success, error)

func (*Agent) SetAccount

func (a *Agent) SetAccount(context.Context, *AttrSetting) (*Success, error)

UserSetting

func (*Agent) SetCharacter

func (a *Agent) SetCharacter(c context.Context, setting *CharacterSetting) (*Success, error)

func (*Agent) UpdateHome

func (a *Agent) UpdateHome(*Empty, ClientToAgent_UpdateHomeServer) error

View

func (*Agent) UpdateRoomContent

func (a *Agent) UpdateRoomContent(e *Empty, stream ClientToAgent_UpdateRoomContentServer) error

func (*Agent) UpdateRoomList

func (a *Agent) UpdateRoomList(e *Empty, stream ClientToAgent_UpdateRoomListServer) error

func (*Agent) UpdateUserList

func (a *Agent) UpdateUserList(*Empty, ClientToAgent_UpdateUserListServer) error

type ErrorPipe

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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