mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 07:57:13 +08:00
Fix cluster api responses
This commit is contained in:
@@ -2,6 +2,7 @@ package cluster
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"sync"
|
||||
@@ -11,6 +12,8 @@ import (
|
||||
"github.com/datarhei/core/v16/net"
|
||||
)
|
||||
|
||||
var ErrNodeNotFound = errors.New("node not found")
|
||||
|
||||
type ClusterReader interface {
|
||||
GetURL(path string) (string, error)
|
||||
GetFile(path string) (io.ReadCloser, error)
|
||||
@@ -182,7 +185,7 @@ func (c *cluster) RemoveNode(id string) error {
|
||||
|
||||
node, ok := c.nodes[id]
|
||||
if !ok {
|
||||
return nil
|
||||
return ErrNodeNotFound
|
||||
}
|
||||
|
||||
node.stop()
|
||||
|
Reference in New Issue
Block a user