We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 539d45c commit 5a1a016Copy full SHA for 5a1a016
cluster/base/cluster.go
@@ -7,8 +7,8 @@ import (
7
8
// Cluster 集群管理器接口
9
type Cluster interface {
10
- // RegInstance 注册本地实例,实例name要保证集群内唯一
11
- RegInstance(ctx context.Context, name string) (Instance, error)
+ // RegInstance 注册本地实例,实例id要保证集群内唯一
+ RegInstance(ctx context.Context, id string) (Instance, error)
12
// UnregInstance 注销本地实例
13
UnregInstance(ctx context.Context) error
14
// GetLocalInstance 获取本地实例
cluster/base/instance.go
@@ -3,8 +3,8 @@ package base
3
4
// Instance 集群实例接口
5
type Instance interface {
6
- // GetName 获取实例名
- GetName() string
+ // GetID 获取实例ID,该ID应该在集群内唯一
+ GetID() string
// IsValid 是否是有效实例
IsValid() bool
// IsSame() 是否是同一个实例
0 commit comments