| 55 | ) |
| 56 | |
| 57 | type Node interface { |
| 58 | ID() string |
| 59 | Password() string |
| 60 | Addr() string |
| 61 | IsMaster() bool |
| 62 | |
| 63 | SetRole(string) |
| 64 | SetPassword(string) |
| 65 | |
| 66 | Reset(ctx context.Context) error |
| 67 | GetClusterNodeInfo(ctx context.Context) (*ClusterNodeInfo, error) |
| 68 | GetClusterInfo(ctx context.Context) (*ClusterInfo, error) |
| 69 | SyncClusterInfo(ctx context.Context, cluster *Cluster) error |
| 70 | CheckClusterMode(ctx context.Context) (int64, error) |
| 71 | MigrateSlot(ctx context.Context, slot SlotRange, NodeID string) error |
| 72 | |
| 73 | MarshalJSON() ([]byte, error) |
| 74 | UnmarshalJSON(data []byte) error |
| 75 | |
| 76 | GetClusterNodesString(ctx context.Context) (string, error) |
| 77 | } |
| 78 | |
| 79 | type ClusterNode struct { |
| 80 | id string |
no outgoing calls
no test coverage detected