manager

package
v0.0.0-...-c916a4f Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name   string
	Logger *zap.Logger
}

Config stores the configuration for the manager.

type Manager

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

Manager wraps a game instance and manages client connections.

func New

func New(cfg *Config) *Manager

New creates a new game and returns its GUID.

func (*Manager) Close

func (m *Manager) Close()

Close shuts down the manager.

func (*Manager) Connect

func (m *Manager) Connect()

Connect is invoked when a new connection is received.

func (*Manager) Name

func (m *Manager) Name() string

Name returns the name of the game.

Jump to

Keyboard shortcuts

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