config

package
v0.0.0-...-8b2cf58 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitServerConfig

func InitServerConfig(configFrom SerializationConfig)

func IsK8s

func IsK8s() bool

func K8sNameSpaces

func K8sNameSpaces() string

func SetConfig

func SetConfig(config IServerConfig)

Types

type DbConfig

type DbConfig struct {
	DbUrl string `json:"db_url,omitempty"`
}

type DefaultConfig

type DefaultConfig struct {
	GameRunTime SGameRunTime `json:"gameRunTime"`
}

func (*DefaultConfig) GetGameFrameTime

func (c *DefaultConfig) GetGameFrameTime() time.Duration

type IServerConfig

type IServerConfig interface {
	GetGameFrameTime() time.Duration
}

func GetGlobalConfig

func GetGlobalConfig() IServerConfig

type RedisConfig

type RedisConfig struct {
	RedisAddr []string `json:"redis_addr"`
	RedisPass string   `json:"redis_pass"`
	RedisUser string   `json:"redis_user"`
}

type SGameRunTime

type SGameRunTime struct {
	TimeSpentPerFrame time.Duration `json:"TimeSpentPerFrame"`
}

type SerializationConfig

type SerializationConfig func() IServerConfig

Jump to

Keyboard shortcuts

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