Documentation ¶
Index ¶
- Constants
- Variables
- func BootNodeSendData(w http.ResponseWriter, req *http.Request)
- func CheckConfiValidators()
- func CheckQRNGStatus()
- func CloseDB()
- func ConnectDB()
- func CoordinatorConfirmation(w http.ResponseWriter, req *http.Request)
- func FindNode(dbStruct global.QManDBStruct) (found bool)
- func GetAttemptsFromContext(r *http.Request) int
- func GetDBData()
- func GetRetryFromContext(r *http.Request) int
- func GovernanceAddValidators(w http.ResponseWriter, req *http.Request)
- func GovernanceGetValidatorList(w http.ResponseWriter, req *http.Request)
- func GovernanceRemoveValidators(w http.ResponseWriter, req *http.Request)
- func GovernanceSendList(w http.ResponseWriter, req *http.Request)
- func InitialValidatorConfigParsing()
- func InitializeQManager()
- func PeriodicValidatorConfigParsing()
- func Ping(w http.ResponseWriter, req *http.Request)
- func Save(dbStruct global.QManDBStruct) (saved bool)
- func SaveToDB(Address []byte, NodeDetails []byte) (saved bool)
- func Start(Addr *string, qmanKey *ecdsa.PrivateKey)
- func StartExpirationChecker()
- func StartQRNGRefresher()
- func UpdateSenatorCandidateNodes()
- type Backend
- type ServerPool
Constants ¶
View Source
const ( Attempts int = iota Retry )
Variables ¶
View Source
var ( Counter int //Divisor int CoordiQrnd uint64 DBName string ConfigValidatorsParsed bool )
View Source
var IsInUse = false
Functions ¶
func BootNodeSendData ¶
func BootNodeSendData(w http.ResponseWriter, req *http.Request)
func CheckConfiValidators ¶
func CheckConfiValidators()
func CheckQRNGStatus ¶
func CheckQRNGStatus()
func CoordinatorConfirmation ¶
func CoordinatorConfirmation(w http.ResponseWriter, req *http.Request)
func FindNode ¶
func FindNode(dbStruct global.QManDBStruct) (found bool)
func GetAttemptsFromContext ¶
GetAttemptsFromContext returns the attempts for request
func GetRetryFromContext ¶
GetAttemptsFromContext returns the attempts for request
func GovernanceAddValidators ¶ added in v0.2.0
func GovernanceAddValidators(w http.ResponseWriter, req *http.Request)
func GovernanceGetValidatorList ¶ added in v0.2.0
func GovernanceGetValidatorList(w http.ResponseWriter, req *http.Request)
func GovernanceRemoveValidators ¶ added in v0.2.0
func GovernanceRemoveValidators(w http.ResponseWriter, req *http.Request)
func GovernanceSendList ¶
func GovernanceSendList(w http.ResponseWriter, req *http.Request)
func InitialValidatorConfigParsing ¶
func InitialValidatorConfigParsing()
func InitializeQManager ¶
func InitializeQManager()
func PeriodicValidatorConfigParsing ¶
func PeriodicValidatorConfigParsing()
func Save ¶
func Save(dbStruct global.QManDBStruct) (saved bool)
func Start ¶
func Start(Addr *string, qmanKey *ecdsa.PrivateKey)
func StartExpirationChecker ¶
func StartExpirationChecker()
func StartQRNGRefresher ¶
func StartQRNGRefresher()
func UpdateSenatorCandidateNodes ¶
func UpdateSenatorCandidateNodes()
Types ¶
type Backend ¶
type Backend struct { URL *url.URL Alive bool ReverseProxy *httputil.ReverseProxy // contains filtered or unexported fields }
Backend holds the data about a server
type ServerPool ¶
type ServerPool struct {
// contains filtered or unexported fields
}
ServerPool holds information about reachable backends
func (*ServerPool) AddBackend ¶
func (s *ServerPool) AddBackend(backend *Backend)
AddBackend to the server pool
func (*ServerPool) GetNextPeer ¶
func (s *ServerPool) GetNextPeer() *Backend
GetNextPeer returns next active peer to take a connection
func (*ServerPool) HealthCheck ¶
func (s *ServerPool) HealthCheck()
HealthCheck pings the backends and update the status
func (*ServerPool) MarkBackendStatus ¶
func (s *ServerPool) MarkBackendStatus(backendUrl *url.URL, alive bool)
MarkBackendStatus changes a status of a backend
func (*ServerPool) NextIndex ¶
func (s *ServerPool) NextIndex() int
NextIndex atomically increase the counter and return an index
Click to show internal directories.
Click to hide internal directories.