friend

package
v0.0.0-...-2692626 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	protofriend.UnimplementedFriendServiceServer
}

func (*APIServer) BidirectionalBinaryData

func (s *APIServer) BidirectionalBinaryData(stream protofriend.FriendService_BidirectionalBinaryDataServer) error

type Bus

type Bus struct {
	*server.Normal
}

Bus 总线

func (*Bus) OnEventBus

func (p *Bus) OnEventBus(v interface{}) error

OnEventBus 处理事件-总线

func (*Bus) OnEventEtcd

func (p *Bus) OnEventEtcd(key string, value string) error

OnEventEtcd 处理事件-etcd

type Friend

type Friend struct {
	*pkgserver.Normal
	// contains filtered or unexported fields
}

func NewFriend

func NewFriend(normal *pkgserver.Normal) *Friend

func (*Friend) CanHandle

func (p *Friend) CanHandle(messageID uint32) bool

CanHandle 是否可以处理的命令 判断cmd是否符合自己可以处理的消息类型 如果符合,返回true;否则,返回false

func (*Friend) Handle

func (*Friend) OnPreStop

func (p *Friend) OnPreStop(_ context.Context) (err error)

func (*Friend) OnStart

func (p *Friend) OnStart(ctx context.Context) (err error)

func (*Friend) OnTimerEachDayFun

func (p *Friend) OnTimerEachDayFun(_ interface{})

OnTimerEachDayFun 新的一天

func (*Friend) OnTimerEachSecondFun

func (p *Friend) OnTimerEachSecondFun(arg interface{})

OnTimerEachSecondFun 新的一秒

func (*Friend) String

func (p *Friend) String() string

type User

type User struct {
	Stream grpc.ServerStream
	// contains filtered or unexported fields
}

User 用户

func (*User) OnHandler

func (p *User) OnHandler(msg *libactor.Msg) error

OnHandler 处理收到的消息

type UserMgr

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

func (*UserMgr) DeleteUser

func (p *UserMgr) DeleteUser(key string)

func (*UserMgr) Find

func (p *UserMgr) Find(key string) *User

func (*UserMgr) FindByStream

func (p *UserMgr) FindByStream(stream grpc.ServerStream) *User

func (*UserMgr) SpawnUser

func (p *UserMgr) SpawnUser(key string, stream grpc.ServerStream) *User

Jump to

Keyboard shortcuts

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