File operations

This commit is contained in:
Barak Michener 2018-03-31 16:58:46 -07:00
parent 4015bc3896
commit 892908fcf5
5 changed files with 260 additions and 8 deletions

View file

@ -66,6 +66,7 @@ func (c *client) DialAndServe(addr string) error {
func (c *client) tx() {
for x := range c.txchan {
logrus.Printf("tx: %#v\n", x)
err := c.conn.WriteJSON(x)
if err != nil {
logrus.Errorf("tx error: %s\n", err)
@ -79,6 +80,7 @@ func (c *client) rx() {
for {
req := &kubelwagen.Request{}
err := c.conn.ReadJSON(req)
logrus.Printf("rx: %#v\n", req)
if err != nil {
logrus.Errorf("rx error: %s\n", err)
return