mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-22 21:46:18 +01:00
- separate collection related code from hub.go - ensure hub is bootstrapped and collections updated automatically when calling NewHub
27 lines
534 B
Go
27 lines
534 B
Go
//go:build testing
|
|
|
|
package hub
|
|
|
|
import (
|
|
"github.com/henrygd/beszel/internal/hub/systems"
|
|
)
|
|
|
|
// TESTING ONLY: GetSystemManager returns the system manager
|
|
func (h *Hub) GetSystemManager() *systems.SystemManager {
|
|
return h.sm
|
|
}
|
|
|
|
// TESTING ONLY: GetPubkey returns the public key
|
|
func (h *Hub) GetPubkey() string {
|
|
return h.pubKey
|
|
}
|
|
|
|
// TESTING ONLY: SetPubkey sets the public key
|
|
func (h *Hub) SetPubkey(pubkey string) {
|
|
h.pubKey = pubkey
|
|
}
|
|
|
|
func (h *Hub) SetCollectionAuthSettings() error {
|
|
return setCollectionAuthSettings(h)
|
|
}
|