cloud

package
v0.0.0-...-9e256ac Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const AWSProfile = "mk48"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

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

A nil cloud is valid to use with any methods (acts as a no-op) This just means server is in offline mode

func New

func New(disableLeaderboard bool) (*Cloud, error)

Returns nil cloud on error

func (*Cloud) FlushStatistics

func (cloud *Cloud) FlushStatistics() error

Flushes accumulated statistics to database

func (*Cloud) IncrementNewPlayerStatistic

func (cloud *Cloud) IncrementNewPlayerStatistic()

func (*Cloud) IncrementPlayerStatistic

func (cloud *Cloud) IncrementPlayerStatistic()

func (*Cloud) IncrementPlaysStatistic

func (cloud *Cloud) IncrementPlaysStatistic()

func (*Cloud) String

func (cloud *Cloud) String() string

func (*Cloud) UpdateLeaderboard

func (cloud *Cloud) UpdateLeaderboard(playerScores map[string]int) (err error)

func (*Cloud) UpdatePeriod

func (cloud *Cloud) UpdatePeriod() time.Duration

func (*Cloud) UpdateServer

func (cloud *Cloud) UpdateServer(players int) error

Call at least every 30s

func (*Cloud) UploadTerrainSnapshot

func (cloud *Cloud) UploadTerrainSnapshot(data []byte) error

type UserData

type UserData struct {
	Domain        string
	Region        string
	Stage         string
	ServerSlots   int
	Route53ZoneID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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