mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-23 14:32:25 +00:00
c7357a9872
Fixes: ``` panic: invalid argument to IntN goroutine 401 [running]: math/rand/v2.(*Rand).IntN(...) /home/mudler/_git/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.4.linux-amd64/src/math/rand/v2/rand.go:190 math/rand/v2.IntN(...) /home/mudler/_git/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.4.linux-amd64/src/math/rand/v2/rand.go:307 github.com/mudler/LocalAI/core/cli.Proxy.func2() /home/mudler/_git/LocalAI/core/cli/federated.go:104 +0x76e created by github.com/mudler/LocalAI/core/cli.Proxy in goroutine 1 /home/mudler/_git/LocalAI/core/cli/federated.go:91 +0x3c5 ``` When no nodes are found and something is trying to hit the federated endpoint (and no tunnels are ready yet). Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
32 lines
601 B
Go
32 lines
601 B
Go
//go:build !p2p
|
|
// +build !p2p
|
|
|
|
package p2p
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/mudler/edgevpn/pkg/node"
|
|
)
|
|
|
|
func GenerateToken() string {
|
|
return "not implemented"
|
|
}
|
|
|
|
func ServiceDiscoverer(ctx context.Context, node *node.Node, token, servicesID string, fn func(string, NodeData)) error {
|
|
return fmt.Errorf("not implemented")
|
|
}
|
|
|
|
func ExposeService(ctx context.Context, host, port, token, servicesID string) error {
|
|
return fmt.Errorf("not implemented")
|
|
}
|
|
|
|
func IsP2PEnabled() bool {
|
|
return false
|
|
}
|
|
|
|
func NewNode(token string) (*node.Node, error) {
|
|
return nil, fmt.Errorf("not implemented")
|
|
}
|