forked from portworx/kvdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kvdb_controller_not_supported.go
44 lines (34 loc) · 1.29 KB
/
kvdb_controller_not_supported.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package kvdb
var (
// ControllerNotSupported is a null controller implementation. This can be used
// kvdb implementors that do no want to implement the controller interface
ControllerNotSupported = &controllerNotSupported{}
)
type controllerNotSupported struct{}
func (c *controllerNotSupported) AddMember(nodeIP, nodePeerPort, nodeName string) (map[string][]string, error) {
return nil, ErrNotSupported
}
func (c *controllerNotSupported) AddLearner(nodeIP, nodePeerPort, nodeName string) (map[string][]string, error) {
return nil, ErrNotSupported
}
func (c *controllerNotSupported) RemoveMember(nodeID string, nodeIP string) error {
return ErrNotSupported
}
func (c *controllerNotSupported) RemoveMemberByID(memberID uint64) error {
return ErrNotSupported
}
func (c *controllerNotSupported) UpdateMember(nodeIP, nodePeerPort, nodeName string) (map[string][]string, error) {
return nil, ErrNotSupported
}
func (c *controllerNotSupported) ListMembers() (map[uint64]*MemberInfo, error) {
return nil, ErrNotSupported
}
func (c *controllerNotSupported) SetEndpoints(endpoints []string) error {
return ErrNotSupported
}
func (c *controllerNotSupported) GetEndpoints() []string {
return []string{}
}
func (c *controllerNotSupported) Defragment(endpoint string, timeout int) error {
return ErrNotSupported
}