mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-15 17:46:55 +00:00
convert final touches
This commit is contained in:
parent
cdcb7fb079
commit
89e6298583
1 changed files with 2 additions and 6 deletions
|
@ -42,10 +42,6 @@ type backendInfo struct {
|
||||||
|
|
||||||
var Backend *backendInfo
|
var Backend *backendInfo
|
||||||
|
|
||||||
var backendSharedKey [32]byte
|
|
||||||
|
|
||||||
var lastBackendSuccess map[string]time.Time
|
|
||||||
|
|
||||||
func setupBackend(config *ConfigFile) *backendInfo {
|
func setupBackend(config *ConfigFile) *backendInfo {
|
||||||
b := new(backendInfo)
|
b := new(backendInfo)
|
||||||
Backend = b
|
Backend = b
|
||||||
|
@ -60,7 +56,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
|
||||||
b.postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats)
|
b.postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats)
|
||||||
|
|
||||||
epochTime := time.Unix(0, 0).UTC()
|
epochTime := time.Unix(0, 0).UTC()
|
||||||
lastBackendSuccess = map[string]time.Time{
|
lastBackendSuccess := map[string]time.Time{
|
||||||
bPathAnnounceStartup: epochTime,
|
bPathAnnounceStartup: epochTime,
|
||||||
bPathAddTopic: epochTime,
|
bPathAddTopic: epochTime,
|
||||||
bPathAggStats: epochTime,
|
bPathAggStats: epochTime,
|
||||||
|
@ -72,7 +68,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
|
||||||
copy(theirPublic[:], config.BackendPublicKey)
|
copy(theirPublic[:], config.BackendPublicKey)
|
||||||
copy(ourPrivate[:], config.OurPrivateKey)
|
copy(ourPrivate[:], config.OurPrivateKey)
|
||||||
|
|
||||||
box.Precompute(&backendSharedKey, &theirPublic, &ourPrivate)
|
box.Precompute(&b.sharedKey, &theirPublic, &ourPrivate)
|
||||||
|
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue