mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 14:35:00 +00:00
refactor: move federated server logic to its own service (#2914)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
bf9dd1de7f
commit
24a8eebcef
6 changed files with 153 additions and 124 deletions
15
core/p2p/federated.go
Normal file
15
core/p2p/federated.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package p2p
|
||||
|
||||
const FederatedID = "federated"
|
||||
|
||||
type FederatedServer struct {
|
||||
listenAddr, service, p2ptoken string
|
||||
}
|
||||
|
||||
func NewFederatedServer(listenAddr, service, p2pToken string) *FederatedServer {
|
||||
return &FederatedServer{
|
||||
listenAddr: listenAddr,
|
||||
service: service,
|
||||
p2ptoken: p2pToken,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue