Documentation ¶
Overview ¶
code generated by orbit
Index ¶
- Constants
- Variables
- type BidirectionalArg
- func (z *BidirectionalArg) DecodeMsg(dc *msgp.Reader) (err error)
- func (z BidirectionalArg) EncodeMsg(en *msgp.Writer) (err error)
- func (z BidirectionalArg) MarshalMsg(b []byte) (o []byte, err error)
- func (z BidirectionalArg) Msgsize() (s int)
- func (z *BidirectionalArg) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BidirectionalClientStream
- type BidirectionalRet
- func (z *BidirectionalRet) DecodeMsg(dc *msgp.Reader) (err error)
- func (z BidirectionalRet) EncodeMsg(en *msgp.Writer) (err error)
- func (z BidirectionalRet) MarshalMsg(b []byte) (o []byte, err error)
- func (z BidirectionalRet) Msgsize() (s int)
- func (z *BidirectionalRet) UnmarshalMsg(bts []byte) (o []byte, err error)
- type BidirectionalServiceStream
- type Client
- type ClockTimeClientStream
- type ClockTimeRet
- type ClockTimeServiceStream
- type Info
- type SayHiArg
- type SayHiRet
- type Service
- type ServiceHandler
- type TestArg
- type TestRet
- type TimeStreamClientStream
- type TimeStreamServiceStream
- type Vehicle
Constants ¶
const ( ErrCodeIAmAnError = 2 ErrCodeThisIsATest = 1 )
const ( CallIDSayHi = "SayHi" CallIDTest = "Test" // StreamIDs StreamIDLul = "Lul" StreamIDTimeStream = "TimeStream" StreamIDClockTime = "ClockTime" StreamIDBidirectional = "Bidirectional" )
CallIDs
Variables ¶
var ( ErrIAmAnError = errors.New("i am an error") ErrThisIsATest = errors.New("this is a test") )
var ErrClosed = errors.New("closed")
Functions ¶
This section is empty.
Types ¶
type BidirectionalArg ¶ added in v1.5.0
type BidirectionalArg struct {
Question string
}
func (*BidirectionalArg) DecodeMsg ¶ added in v1.5.0
func (z *BidirectionalArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (BidirectionalArg) EncodeMsg ¶ added in v1.5.0
func (z BidirectionalArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (BidirectionalArg) MarshalMsg ¶ added in v1.5.0
func (z BidirectionalArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (BidirectionalArg) Msgsize ¶ added in v1.5.0
func (z BidirectionalArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*BidirectionalArg) UnmarshalMsg ¶ added in v1.5.0
func (z *BidirectionalArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BidirectionalClientStream ¶ added in v1.5.0
type BidirectionalClientStream struct { oclient.TypedStreamCloser // contains filtered or unexported fields }
func (*BidirectionalClientStream) Read ¶ added in v1.5.0
func (v1 *BidirectionalClientStream) Read() (ret BidirectionalRet, err error)
func (*BidirectionalClientStream) Write ¶ added in v1.5.0
func (v1 *BidirectionalClientStream) Write(arg BidirectionalArg) (err error)
type BidirectionalRet ¶ added in v1.5.0
type BidirectionalRet struct {
Answer string
}
func (*BidirectionalRet) DecodeMsg ¶ added in v1.5.0
func (z *BidirectionalRet) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (BidirectionalRet) EncodeMsg ¶ added in v1.5.0
func (z BidirectionalRet) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (BidirectionalRet) MarshalMsg ¶ added in v1.5.0
func (z BidirectionalRet) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (BidirectionalRet) Msgsize ¶ added in v1.5.0
func (z BidirectionalRet) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*BidirectionalRet) UnmarshalMsg ¶ added in v1.5.0
func (z *BidirectionalRet) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BidirectionalServiceStream ¶ added in v1.5.0
type BidirectionalServiceStream struct { oservice.TypedStreamCloser // contains filtered or unexported fields }
func (*BidirectionalServiceStream) Read ¶ added in v1.5.0
func (v1 *BidirectionalServiceStream) Read() (arg BidirectionalArg, err error)
func (*BidirectionalServiceStream) Write ¶ added in v1.5.0
func (v1 *BidirectionalServiceStream) Write(ret BidirectionalRet) (err error)
type Client ¶ added in v0.3.0
type Client interface { closer.Closer // Calls SayHi(ctx context.Context, arg SayHiArg) (ret SayHiRet, err error) Test(ctx context.Context, arg TestArg) (ret TestRet, err error) // Streams Lul(ctx context.Context) (stream transport.Stream, err error) TimeStream(ctx context.Context) (stream *TimeStreamClientStream, err error) ClockTime(ctx context.Context) (stream *ClockTimeClientStream, err error) Bidirectional(ctx context.Context) (stream *BidirectionalClientStream, err error) }
type ClockTimeClientStream ¶ added in v1.5.0
type ClockTimeClientStream struct { oclient.TypedStreamCloser // contains filtered or unexported fields }
func (*ClockTimeClientStream) Read ¶ added in v1.5.0
func (v1 *ClockTimeClientStream) Read() (ret ClockTimeRet, err error)
type ClockTimeRet ¶ added in v1.4.0
func (*ClockTimeRet) DecodeMsg ¶ added in v1.4.0
func (z *ClockTimeRet) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ClockTimeRet) EncodeMsg ¶ added in v1.4.0
func (z ClockTimeRet) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ClockTimeRet) MarshalMsg ¶ added in v1.4.0
func (z ClockTimeRet) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ClockTimeRet) Msgsize ¶ added in v1.4.0
func (z ClockTimeRet) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ClockTimeRet) UnmarshalMsg ¶ added in v1.4.0
func (z *ClockTimeRet) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ClockTimeServiceStream ¶ added in v1.5.0
type ClockTimeServiceStream struct { oservice.TypedStreamCloser // contains filtered or unexported fields }
func (*ClockTimeServiceStream) Write ¶ added in v1.5.0
func (v1 *ClockTimeServiceStream) Write(ret ClockTimeRet) (err error)
type Info ¶
type Info struct { Name string `validate:"required,min=1"` Age int `validate:"required,min=1,max=155"` Locale string `validate:"required,len=5"` Address string `validate:"omitempty"` }
func (*Info) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type SayHiArg ¶ added in v0.3.0
func (SayHiArg) MarshalMsg ¶ added in v0.3.0
MarshalMsg implements msgp.Marshaler
type SayHiRet ¶ added in v1.4.0
type SayHiRet struct {
Res []int `validate:"required,min=1"`
}
func (*SayHiRet) MarshalMsg ¶ added in v1.4.0
MarshalMsg implements msgp.Marshaler
type Service ¶ added in v0.3.0
func NewService ¶ added in v0.3.0
func NewService(h ServiceHandler, opts *oservice.Options) (s Service, err error)
type ServiceHandler ¶ added in v0.3.0
type ServiceHandler interface { // Calls SayHi(ctx oservice.Context, arg SayHiArg) (ret SayHiRet, err error) Test(ctx oservice.Context, arg TestArg) (ret TestRet, err error) // Streams Lul(ctx oservice.Context, stream transport.Stream) TimeStream(ctx oservice.Context, stream *TimeStreamServiceStream) error ClockTime(ctx oservice.Context, stream *ClockTimeServiceStream) error Bidirectional(ctx oservice.Context, stream *BidirectionalServiceStream) error }
type TestArg ¶ added in v1.4.0
type TestArg struct {
S string
}
func (TestArg) MarshalMsg ¶ added in v1.4.0
MarshalMsg implements msgp.Marshaler
type TestRet ¶ added in v0.3.0
func (TestRet) MarshalMsg ¶ added in v0.3.0
MarshalMsg implements msgp.Marshaler
type TimeStreamClientStream ¶ added in v1.5.0
type TimeStreamClientStream struct { oclient.TypedStreamCloser // contains filtered or unexported fields }
func (*TimeStreamClientStream) Write ¶ added in v1.5.0
func (v1 *TimeStreamClientStream) Write(arg Info) (err error)
type TimeStreamServiceStream ¶ added in v1.5.0
type TimeStreamServiceStream struct { oservice.TypedStreamCloser // contains filtered or unexported fields }
func (*TimeStreamServiceStream) Read ¶ added in v1.5.0
func (v1 *TimeStreamServiceStream) Read() (arg Info, err error)
type Vehicle ¶ added in v0.3.0
type Vehicle int
func (Vehicle) MarshalMsg ¶ added in v0.3.0
MarshalMsg implements msgp.Marshaler