server

package
v0.0.0-...-aabb4a4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2014 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	Connstr     string
	Name        string
	ConnTimeout int
}

type DBStatus

type DBStatus struct {
	Db              string
	Collections     int
	Objects         int
	AvgObjectSize   float32
	DataSize        int
	NumExtents      int
	Indexes         int
	IndexesSize     int
	FileSize        int
	NSFileSize      int
	Ok              int
	DataFileVersion *DataFileVersion
	ExtentFreeList  *ExtentFreeList
}

type DataFileVersion

type DataFileVersion struct {
	Major int
	Minor int
}

type ExtentFreeList

type ExtentFreeList struct {
	Num       int
	TotalSize int
}

type Server

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

func NewServer

func NewServer(cfg *ServerConfig) *Server

Returns a new pointer of Server.

func (*Server) CheckDBConnection

func (s *Server) CheckDBConnection() bool

checks if the current Connection to the database is responding

func (*Server) DBStats

func (s *Server) DBStats() *DBStatus

func (*Server) DBStatsScaled

func (s *Server) DBStatsScaled(scale int) *DBStatus

func (*Server) Run

func (s *Server) Run()

type ServerConfig

type ServerConfig struct {
	Db       DBConfig
	RestPort int
	LogPath  string
}

func LoadConfig

func LoadConfig(path string) ServerConfig

Loads configuration information for the server

Jump to

Keyboard shortcuts

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