X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=core%2Fcontrol_ping.go;h=cd447b77becea3b463451fc955b0e03ebb98b750;hb=df05a70f90a1486a86a4156b1b0d68c94f2098b4;hp=904068a8903c94fd9e74044654f6c98a0cf7a512;hpb=fa21c9d726ebb807895a8571af9a16dab5cd8d6e;p=govpp.git diff --git a/core/control_ping.go b/core/control_ping.go index 904068a..cd447b7 100644 --- a/core/control_ping.go +++ b/core/control_ping.go @@ -7,6 +7,16 @@ var ( msgControlPingReply api.Message = new(ControlPingReply) ) +// SetControlPing sets the control ping message used by core. +func SetControlPing(m api.Message) { + msgControlPing = m +} + +// SetControlPingReply sets the control ping reply message used by core. +func SetControlPingReply(m api.Message) { + msgControlPingReply = m +} + type ControlPing struct{} func (*ControlPing) GetMessageName() string { @@ -34,3 +44,8 @@ func (*ControlPingReply) GetCrcString() string { func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage } + +func init() { + api.RegisterMessage((*ControlPing)(nil), "ControlPing") + api.RegisterMessage((*ControlPingReply)(nil), "ControlPingReply") +}