Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ProcessNewStream ¶
func (c *Client) ProcessNewStream( cmdCh chan<- *arhatgopb.Cmd, msgCh <-chan *arhatgopb.Msg, ) error
ProcessNewStream creates a new connection and handles message stream until connection lost or msgCh closed the provided `cmdCh` and `msgCh` are expected to be freshly created usually this function is used in conjunction with Controller.RefreshChannels
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( ctx context.Context, logger log.Interface, h types.Handler, ) (*Controller, error)
NewController creates a hub for message send/receive
func (*Controller) Close ¶
func (c *Controller) Close()
func (*Controller) RefreshChannels ¶
func (c *Controller) RefreshChannels() (cmdCh chan<- *arhatgopb.Cmd, msgCh <-chan *arhatgopb.Msg)
RefreshChannels creates a new cmd and msg channel pair for new connection usually this function is called in conjunction with Client.ProcessNewStream
func (*Controller) Start ¶
func (c *Controller) Start() error
Click to show internal directories.
Click to hide internal directories.