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