File: types.go

package info (click to toggle)
golang-gogottrpc 0.0~git20180205.d452837-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 252 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package ttrpc

import (
	"fmt"

	spb "google.golang.org/genproto/googleapis/rpc/status"
)

type Request struct {
	Service string `protobuf:"bytes,1,opt,name=service,proto3"`
	Method  string `protobuf:"bytes,2,opt,name=method,proto3"`
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3"`
}

func (r *Request) Reset()         { *r = Request{} }
func (r *Request) String() string { return fmt.Sprintf("%+#v", r) }
func (r *Request) ProtoMessage()  {}

type Response struct {
	Status  *spb.Status `protobuf:"bytes,1,opt,name=status,proto3"`
	Payload []byte      `protobuf:"bytes,2,opt,name=payload,proto3"`
}

func (r *Response) Reset()         { *r = Response{} }
func (r *Response) String() string { return fmt.Sprintf("%+#v", r) }
func (r *Response) ProtoMessage()  {}