site

package
v0.0.0-...-aa9bcfe Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncreaseTotalClientsBy

func IncreaseTotalClientsBy(number int)

IncreaseTotalClientsBy increases the total of all time connected clients

func UpdateMaxConcurrentClients

func UpdateMaxConcurrentClients(clientNumber int)

UpdateMaxConcurrentClients updates the all time high of concurrent clients

func UpdateMaxConcurrentDomains

func UpdateMaxConcurrentDomains(domainNumber int)

UpdateMaxConcurrentDomains updates the all time high of concurrent clients

func UpdateTotalMessagesBroadcasted

func UpdateTotalMessagesBroadcasted()

UpdateTotalMessagesBroadcasted updates the total number of all time messages broadcasted

Types

type MainsiteDomain

type MainsiteDomain struct {
	Id                       int
	Domain                   string
	ApiKey                   string
	DaysLeft                 int
	MaxConcurrentConnections int
	CurrentMonthApiCalls     int
}

func FindDomainByApiKey

func FindDomainByApiKey(apiKey string) (*MainsiteDomain, error)

GetDomain returns the domain identified by it's API key

func FindDomainByName

func FindDomainByName(name string) (*MainsiteDomain, error)

func (MainsiteDomain) GetMaxConcurrentConnections

func (d MainsiteDomain) GetMaxConcurrentConnections() int

func (MainsiteDomain) IsActive

func (d MainsiteDomain) IsActive() bool

Check if the domain one way or another is active

type MainsiteSettings

type MainsiteSettings struct {
	Id                       int
	ServiceIsActive          bool
	ServiceKey               string
	FreeKeys                 bool
	InBeta                   bool
	MaxConcurrentConnections int
	MaxConnection            int
}

func GetSettings

func GetSettings() (*MainsiteSettings, error)

type MainsiteStatistics

type MainsiteStatistics struct {
	Id                       int
	MaxConcurrentClients     int
	MaxConcurrentDomains     int
	TotalMessagesBroadcasted int64
	TotalClients             int64
}

Stats model to hold some basic application - server stats

Jump to

Keyboard shortcuts

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