server

package
v0.0.0-...-7e023d8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenge

type Challenge struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"`
	EndpointID int64              `bson:"endpointID,omitempty"`
	Value      int32              `bson:"value,omitempty"`
	UpdatedAt  time.Time          `bson:"updatedAt,omitempty"`
}

type GameServer

type GameServer struct {
	ID                primitive.ObjectID `bson:"_id,omitempty"`
	EndpointID        int64              `bson:"endpointID,omitempty"`
	IP                string             `bson:"ip,omitempty"`
	Port              int32              `bson:"port,omitempty"`
	LastHeartbeatDate time.Time          `bson:"lastHeartbeatDate,omitempty"`
}

type MasterServer

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

func NewMasterServer

func NewMasterServer(cfg config.Config) *MasterServer

func (*MasterServer) Listen

func (ms *MasterServer) Listen() error

type ServerEndpoint

type ServerEndpoint struct {
	IP   net.IP
	Port uint16
}

func NewServerEndpoint

func NewServerEndpoint(gameServer *GameServer) *ServerEndpoint

func (*ServerEndpoint) Bytes

func (c *ServerEndpoint) Bytes() []byte

func (*ServerEndpoint) String

func (c *ServerEndpoint) String() string

func (*ServerEndpoint) Uint64

func (c *ServerEndpoint) Uint64() uint64

Jump to

Keyboard shortcuts

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