mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-12 02:27:28 +08:00
优化origin默认模式的服务发现
This commit is contained in:
23
rpc/rpcevent.go
Normal file
23
rpc/rpcevent.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package rpc
|
||||
|
||||
import "github.com/duanhf2012/origin/v2/event"
|
||||
|
||||
type NotifyEventFun func (event event.IEvent)
|
||||
|
||||
// RpcConnEvent Node结点连接事件
|
||||
type RpcConnEvent struct{
|
||||
IsConnect bool
|
||||
NodeId string
|
||||
}
|
||||
|
||||
func (rc *RpcConnEvent) GetEventType() event.EventType{
|
||||
return event.Sys_Event_Node_Conn_Event
|
||||
}
|
||||
|
||||
type NatsConnEvent struct {
|
||||
IsConnect bool
|
||||
}
|
||||
|
||||
func (nc *NatsConnEvent) GetEventType() event.EventType{
|
||||
return event.Sys_Event_Nats_Conn_Event
|
||||
}
|
||||
Reference in New Issue
Block a user