server

package
v0.0.0-...-6e21e7b Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHA_DIGEST_LENGTH = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthKeyConfig

type AuthKeyConfig struct {
	ServerId  int32 // 服务器ID
	Mysql     []mysql_client.MySQLConfig
	Server    ServerConfig
	Discovery service_discovery.ServiceDiscoveryServerConfig

	RpcServer    *rpcServerConfig
	RpcDiscovery service_discovery.ServiceDiscoveryServerConfig
}

type AuthKeyServer

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

func NewAuthKeyServer

func NewAuthKeyServer(configPath string) *AuthKeyServer

func (*AuthKeyServer) Destroy

func (s *AuthKeyServer) Destroy()

func (*AuthKeyServer) Initialize

func (s *AuthKeyServer) Initialize() error

////////////////////////////////////////////////////////////////////////////////////////////////// AppInstance interface

func (*AuthKeyServer) OnConnectionClosed

func (s *AuthKeyServer) OnConnectionClosed(conn *net2.TcpConnection)

func (*AuthKeyServer) OnConnectionDataArrived

func (s *AuthKeyServer) OnConnectionDataArrived(conn *net2.TcpConnection, msg interface{}) error

func (*AuthKeyServer) OnNewConnection

func (s *AuthKeyServer) OnNewConnection(conn *net2.TcpConnection)

////////////////////////////////////////////////////////////////////////////////////////////////// TcpConnectionCallback

func (*AuthKeyServer) RunLoop

func (s *AuthKeyServer) RunLoop()

type AuthKeyServiceImpl

type AuthKeyServiceImpl struct {
}

func (*AuthKeyServiceImpl) QueryAuthKey

func (s *AuthKeyServiceImpl) QueryAuthKey(ctx context.Context, request *mtproto.AuthKeyRequest) (*mtproto.AuthKeyData, error)

rpc QueryAuthKey(AuthKeyRequest) returns (AuthKeyData);

func (*AuthKeyServiceImpl) QueryUserId

rpc QueryUserId(AuthKeyIdRequest) returns (UserIdResponse);

type ServerConfig

type ServerConfig struct {
	Name      string
	ProtoName string
	Addr      string
}

Jump to

Keyboard shortcuts

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