Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdShardWatch ¶
type EtcdShardWatch struct {
// contains filtered or unexported fields
}
EtcdShardWatch used to watch the distributed lock of shard, and provide the corresponding callback function.
func (*EtcdShardWatch) RegisteringEventCallback ¶
func (w *EtcdShardWatch) RegisteringEventCallback(eventCallback ShardEventCallback)
type NoopShardWatch ¶
type NoopShardWatch struct{}
func (NoopShardWatch) RegisteringEventCallback ¶
func (n NoopShardWatch) RegisteringEventCallback(_ ShardEventCallback)
type ShardEventCallback ¶
type ShardEventCallback interface { OnShardRegistered(ctx context.Context, event ShardRegisterEvent) error OnShardExpired(ctx context.Context, event ShardExpireEvent) error }
type ShardExpireEvent ¶
type ShardRegisterEvent ¶
type ShardWatch ¶
type ShardWatch interface { Start(ctx context.Context) error Stop(ctx context.Context) error RegisteringEventCallback(eventCallback ShardEventCallback) }
func NewEtcdShardWatch ¶
func NewNoopShardWatch ¶
func NewNoopShardWatch() ShardWatch
Click to show internal directories.
Click to hide internal directories.