config

package
v0.0.0-...-a978bc6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionCache

type ConnectionCache struct {
	Length time.Duration
}

ConnectionCache stores the configurations loaded from the configuration files about the connection cache

func LoadConnectionCache

func LoadConnectionCache() ConnectionCache

LoadConnectionCache returns a connection cache instance to it's calling library.

type Mongo

type Mongo struct {
	URI      string
	Database string
}

Mongo stores mongodb related configuration information

func LoadMongo

func LoadMongo() Mongo

LoadMongo provides mongodb related configuration to server

type Redis

type Redis struct {
	Addr     string
	Password string
	DB       int
}

Redis struct stores the redis related configuration information

func LoadRedis

func LoadRedis() Redis

LoadRedis provides redis related configuration details

type Server

type Server struct {
	Port string
}

Server is a struct that stores the go server related configuration information

func LoadServer

func LoadServer() Server

LoadServer returns a server instance to it's calling library.

type Session

type Session struct {
	// defines length of a session
	Length time.Duration
	// defines maximum number of session per user
	MaxPerUser int
}

Session holds config for session

func LoadSession

func LoadSession() Session

LoadSession providies session related information

type WSClient

type WSClient struct {
	ReadQBuffer     int
	WriteQBuffer    int
	WriteWait       time.Duration
	PongWait        time.Duration
	PingPeriod      time.Duration
	ReadMessageSize int64
}

WSClient struct holds and provides web socket related configuration information

func LoadWSClient

func LoadWSClient() WSClient

LoadWSClient provides web socket related configuration information

Jump to

Keyboard shortcuts

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