better pool and changed schema

This commit is contained in:
ston1th 2020-06-03 23:10:22 +02:00
commit 249d7c6844
4 changed files with 82 additions and 21 deletions

View file

@ -9,7 +9,6 @@ import (
)
var (
ErrServerNotFound = errors.New("server not found")
ErrNodesOffline = errors.New("one or more nodes are offline")
ErrNodesNotSearched = errors.New("one or more nodes could not be searched")
)
@ -29,8 +28,6 @@ type Node struct {
type NodeList []*Node
type ServerList []*Server
type NodeClient struct {
client *Client
}
@ -106,5 +103,5 @@ func (c *NodeClient) FindServerByURL(ctx context.Context, url string) (s *Server
if err != nil {
return
}
return c.FindServer(ctx, "", id)
return c.FindServerByID(ctx, id)
}