Skip to content

cmd-stream/delegate-go

Repository files navigation

delegate-go

Go Reference GoReportCard codecov

delegate-go provides client and server delegate implementations for the cmd-stream library, based on the client.Delegate and server.Delegate interfaces defined in core-go. Both delegates utilize an abstract transport layer for robust data exchange.

This module allows the server to initialize the client connection by sending a ServerInfo message, typically used to indicate a set of supported Commands. Client creation may fail with an error if the received ServerInfo does not match the expected one.

Additionally, the client package includes two helper delegates:

  • KeepaliveDelegate initiates a ping-pong exchange with the server when no Commands are pending. It sends the Ping Command and expects the Pong Result, both transmitted as a single zero byte (like a ball).
  • ReconnectDelegate implements the client.ReconnectDelegate interface, providing a Reconnect method that should be invoked by the client if the connection to the server is lost.

About

Provides communication between the cmd-stream-go client and server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages