Documentation ¶
Overview ¶
=========================================================================== ORBIT VM PROTECTOR GPL Source Code Copyright (C) 2015 Vasileios Anagnostopoulos. This file is part of the ORBIT VM PROTECTOR Source Code (?ORBIT VM PROTECTOR Source Code?). ORBIT VM PROTECTOR Source Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ORBIT VM PROTECTOR Source Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ORBIT VM PROTECTOR Source Code. If not, see <http://www.gnu.org/licenses/>. In addition, the ORBIT VM PROTECTOR Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. If you have questions concerning this license or the applicable additional terms, you may contact in writing Vasileios Anagnostopoulos, Campani 3 Street, Athens Greece, POBOX 11252. ===========================================================================
jsonutil.go
=========================================================================== ORBIT VM PROTECTOR GPL Source Code Copyright (C) 2015 Vasileios Anagnostopoulos. This file is part of the ORBIT VM PROTECTOR Source Code (?ORBIT VM PROTECTOR Source Code?). ORBIT VM PROTECTOR Source Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ORBIT VM PROTECTOR Source Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ORBIT VM PROTECTOR Source Code. If not, see <http://www.gnu.org/licenses/>. In addition, the ORBIT VM PROTECTOR Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. If you have questions concerning this license or the applicable additional terms, you may contact in writing Vasileios Anagnostopoulos, Campani 3 Street, Athens Greece, POBOX 11252. ===========================================================================
measurements.go
Index ¶
- Constants
- type DBconfig
- type DCDetection
- type DCMeasurments
- type Dcsuspicion
- type DetectionReporter
- type DetectorOpinion
- type ODPconfig
- type OPConfig
- type OPData
- type OPRoute
- type OVPconfig
- type PersistencyLayer
- func (p *PersistencyLayer) Describe(opconfig *OPConfig) *OPData
- func (p *PersistencyLayer) GetDatacenterState(dcid string) *DetectorOpinion
- func (p *PersistencyLayer) GetODPPeers(dcid string) []OPData
- func (p *PersistencyLayer) GetOVPPeers(bound int, opconfig *OPConfig) []OPData
- func (p *PersistencyLayer) GetRoute(dcid string) string
- func (p *PersistencyLayer) Initialize(opconfig *OPConfig) *OPData
- func (p *PersistencyLayer) InsertDCDetection(dcdetection *DCDetection)
- func (p *PersistencyLayer) InsertVMDetection(vmdetection *VMDetection)
- func (p *PersistencyLayer) SetDatacenterFailed(dcid string)
- type ProtectorMeasurements
- type ServerConfig
- type VMDetection
- type VMMeasurments
Constants ¶
const ( MongoTimeout = 60 OrbitDatabase = "orbitgoer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DCDetection ¶
type DCDetection struct { DetectionReporter `bson:",inline"` Dcid string `bson:"watchdog_ovp_dcid" json:"watchdog_ovp_dcid"` Timestamp time.Time `bson:"watchdog_timestamp" json:"watchdog_timestamp"` }
type DCMeasurments ¶
type Dcsuspicion ¶
type Dcsuspicion struct {
// contains filtered or unexported fields
}
func Createdcsuspicion ¶
func Createdcsuspicion() *Dcsuspicion
func (*Dcsuspicion) Reset ¶
func (dd *Dcsuspicion) Reset()
func (*Dcsuspicion) Update ¶
func (dd *Dcsuspicion) Update(status bool)
type DetectionReporter ¶
type DetectorOpinion ¶
type OPConfig ¶
type OPConfig struct { Odip string `bson:"watchdog_odp_ip" json:"watchdog_odp_ip"` Voteport int `bson:"watchdog_odp_voteport" json:"watchdog_odp_voteport"` Pingport int `bson:"watchdog_odp_pingport" json:"watchdog_odp_pingport"` Dcprotecting bool `bson:"watchdog_ovp_dcprotecting" json:"watchdog_ovp_dcprotecting"` Ovip string `bson:"watchdog_ovp_ip" json:"watchdog_ovp_ip"` Serfport int `bson:"watchdog_ovp_serfport" json:"watchdog_ovp_serfport"` Announceport int `bson:"watchdog_ovp_announceport" json:"watchdog_ovp_announceport"` Dcid string `bson:"watchdog_ovp_dcid" json:"watchdog_ovp_dcid"` }
type OPData ¶
type OVPconfig ¶
type OVPconfig struct { Numofwatchers int `json:"numofpeers"` Minwatchers int `json:"minpeers"` Refreshattempts pinglogic.TimedAttempts `json:"refreshattempts"` }
type PersistencyLayer ¶
type PersistencyLayer struct {
// contains filtered or unexported fields
}
func CreatePersistencyLayer ¶
func CreatePersistencyLayer(dbconfig *DBconfig) *PersistencyLayer
func (*PersistencyLayer) Describe ¶
func (p *PersistencyLayer) Describe(opconfig *OPConfig) *OPData
func (*PersistencyLayer) GetDatacenterState ¶
func (p *PersistencyLayer) GetDatacenterState(dcid string) *DetectorOpinion
func (*PersistencyLayer) GetODPPeers ¶
func (p *PersistencyLayer) GetODPPeers(dcid string) []OPData
func (*PersistencyLayer) GetOVPPeers ¶
func (p *PersistencyLayer) GetOVPPeers(bound int, opconfig *OPConfig) []OPData
func (*PersistencyLayer) GetRoute ¶
func (p *PersistencyLayer) GetRoute(dcid string) string
func (*PersistencyLayer) Initialize ¶
func (p *PersistencyLayer) Initialize(opconfig *OPConfig) *OPData
func (*PersistencyLayer) InsertDCDetection ¶
func (p *PersistencyLayer) InsertDCDetection(dcdetection *DCDetection)
func (*PersistencyLayer) InsertVMDetection ¶
func (p *PersistencyLayer) InsertVMDetection(vmdetection *VMDetection)
func (*PersistencyLayer) SetDatacenterFailed ¶
func (p *PersistencyLayer) SetDatacenterFailed(dcid string)
type ProtectorMeasurements ¶
type ServerConfig ¶
type ServerConfig struct { Opconfig OPConfig `json:"opconfig"` Odpconfig ODPconfig `json:"odpconfig"` Ovpconfig OVPconfig `json:"ovpconfig"` Dbconfig DBconfig `json:"dbconfig"` }
func Parsetoconf ¶
func Parsetoconf() (*ServerConfig, error)
type VMDetection ¶
type VMDetection struct { DetectionReporter `bson:",inline"` Ovip string `bson:"watchdog_ovp_ip" json:"watchdog_ovp_ip"` Dcid string `bson:"watchdog_ovp_dcid" json:"watchdog_ovp_dcid"` Timestamp time.Time `bson:"watchdog_timestamp" json:"watchdog_timestamp"` Epoch int `bson:"watchdog_epoch" json:"watchdog_epoch"` Breakage bool `bson:"watchdog_breakage" json:"watchdog_breakage"` Vmid []string `bson:"watchdog_ovp_vmids" json:"watchdog_ovp_vmids"` }
type VMMeasurments ¶
type VMMeasurments struct { Registeredservers int Detections []VMDetection }