blob: 0fc7ebc82964aee06b0b94f0da3c96ed3b0b0a23 [file] [log] [blame]
Jiri Simsa756772c2015-03-25 15:40:54 -07001// Copyright 2015 The Vanadium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Benjamin Prosnitz809246c2014-10-29 14:24:11 -07005package channel
6
7type Request struct {
Todd Wangbb6afc02014-11-21 11:24:20 -08008 Type string
Benjamin Prosnitz86d52282014-12-19 15:48:38 -08009 Seq uint32
Todd Wangbb6afc02014-11-21 11:24:20 -080010 Body any
Benjamin Prosnitz809246c2014-10-29 14:24:11 -070011}
12
13type Response struct {
Benjamin Prosnitz86d52282014-12-19 15:48:38 -080014 ReqSeq uint32
Todd Wangbb6afc02014-11-21 11:24:20 -080015 Err string // TODO(bprosnitz) change this back to error when it is possible to do so. (issue 368)
16 Body any
Benjamin Prosnitz809246c2014-10-29 14:24:11 -070017}
18
Todd Wangb5f66fa2014-12-17 18:16:49 -080019type Message union {
Todd Wangbb6afc02014-11-21 11:24:20 -080020 Request Request
21 Response Response
22}