Documentation ¶
Index ¶
- Constants
- func ReadJSON(conn net.Conn, obj interface{}) error
- func Write(conn net.Conn, cmd int, body []byte) error
- func WriteJSON(conn net.Conn, cmd int, obj interface{}) error
- type AddRouteMsg
- type BroadcastOfflineMsg
- type BroadcastOnlineMsg
- type CSPInfo
- type DelRouteMsg
- type Edge
- type Header
- type Heartbeat
- type RegisterReply
- type RegisterReq
- type ReportMsg
Constants ¶
View Source
const ( // heartbeat between controller and edge CmdHeartbeat // edge register to controller CmdRegister // controller tell edge that new edge join CmdAdd // controller tell edge that edge leave CmdDel // edge report subhost of it to controller CmdReport // alarm report CmdAlarm // add route CmdAddRoute // del route CmdDelRoute )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddRouteMsg ¶ added in v1.2.1
type AddRouteMsg struct { // dst cidr Cidr string // next hop edge listen address // ip:port Nexthop string }
controller deploy route added to edges
type BroadcastOfflineMsg ¶
type BroadcastOfflineMsg struct { // offlined edge host address ListenAddr string // offlined edge network subnet Cidr string }
broadcase edge offline once edge keepalive faile controller will broadcase edge offline msg to all online edges
type BroadcastOnlineMsg ¶
type BroadcastOnlineMsg struct { // onlined edge listen address(udp://ip:port) ListenAddr string // offline edge network subnet(192.168.10.0/24) Cidr string }
broadcast edge online once edge register success controller will broadcast edge online msg to all online edges.
type DelRouteMsg ¶ added in v1.2.1
type DelRouteMsg AddRouteMsg
controller deploy route deleted to edges
type Header ¶
type Header [4]byte
version: 1byte cmd: 1byte body len: 2bytes
type RegisterReply ¶
reply for edge register req
func (*RegisterReply) String ¶
func (r *RegisterReply) String() string
type RegisterReq ¶
edge register req
Click to show internal directories.
Click to hide internal directories.