Documentation ¶
Overview ¶
Package example demonstrates a lightweight protobuf service.
Package example is a generated protocol buffer package. It is generated from these files: github.com/containerd/ttrpc/example/example.proto It has these top-level messages: Method1Request Method1Response Method2Request
Index ¶
- Variables
- func RegisterExampleService(srv *ttrpc.Server, svc ExampleService)
- type ExampleService
- type Method1Request
- func (*Method1Request) Descriptor() ([]byte, []int)
- func (m *Method1Request) Marshal() (dAtA []byte, err error)
- func (m *Method1Request) MarshalTo(dAtA []byte) (int, error)
- func (*Method1Request) ProtoMessage()
- func (m *Method1Request) Reset()
- func (m *Method1Request) Size() (n int)
- func (this *Method1Request) String() string
- func (m *Method1Request) Unmarshal(dAtA []byte) error
- type Method1Response
- func (*Method1Response) Descriptor() ([]byte, []int)
- func (m *Method1Response) Marshal() (dAtA []byte, err error)
- func (m *Method1Response) MarshalTo(dAtA []byte) (int, error)
- func (*Method1Response) ProtoMessage()
- func (m *Method1Response) Reset()
- func (m *Method1Response) Size() (n int)
- func (this *Method1Response) String() string
- func (m *Method1Response) Unmarshal(dAtA []byte) error
- type Method2Request
- func (*Method2Request) Descriptor() ([]byte, []int)
- func (m *Method2Request) Marshal() (dAtA []byte, err error)
- func (m *Method2Request) MarshalTo(dAtA []byte) (int, error)
- func (*Method2Request) ProtoMessage()
- func (m *Method2Request) Reset()
- func (m *Method2Request) Size() (n int)
- func (this *Method2Request) String() string
- func (m *Method2Request) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowExample = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterExampleService ¶
func RegisterExampleService(srv *ttrpc.Server, svc ExampleService)
Types ¶
type ExampleService ¶
type ExampleService interface { Method1(ctx context.Context, req *Method1Request) (*Method1Response, error) Method2(ctx context.Context, req *Method1Request) (*google_protobuf.Empty, error) }
func NewExampleClient ¶
func NewExampleClient(client *ttrpc.Client) ExampleService
type Method1Request ¶
type Method1Request struct { Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` Bar string `protobuf:"bytes,2,opt,name=bar,proto3" json:"bar,omitempty"` }
func (*Method1Request) Descriptor ¶
func (*Method1Request) Descriptor() ([]byte, []int)
func (*Method1Request) Marshal ¶
func (m *Method1Request) Marshal() (dAtA []byte, err error)
func (*Method1Request) ProtoMessage ¶
func (*Method1Request) ProtoMessage()
func (*Method1Request) Reset ¶
func (m *Method1Request) Reset()
func (*Method1Request) Size ¶
func (m *Method1Request) Size() (n int)
func (*Method1Request) String ¶
func (this *Method1Request) String() string
func (*Method1Request) Unmarshal ¶
func (m *Method1Request) Unmarshal(dAtA []byte) error
type Method1Response ¶
type Method1Response struct { Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` Bar string `protobuf:"bytes,2,opt,name=bar,proto3" json:"bar,omitempty"` }
func (*Method1Response) Descriptor ¶
func (*Method1Response) Descriptor() ([]byte, []int)
func (*Method1Response) Marshal ¶
func (m *Method1Response) Marshal() (dAtA []byte, err error)
func (*Method1Response) ProtoMessage ¶
func (*Method1Response) ProtoMessage()
func (*Method1Response) Reset ¶
func (m *Method1Response) Reset()
func (*Method1Response) Size ¶
func (m *Method1Response) Size() (n int)
func (*Method1Response) String ¶
func (this *Method1Response) String() string
func (*Method1Response) Unmarshal ¶
func (m *Method1Response) Unmarshal(dAtA []byte) error
type Method2Request ¶
type Method2Request struct {
Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
}
func (*Method2Request) Descriptor ¶
func (*Method2Request) Descriptor() ([]byte, []int)
func (*Method2Request) Marshal ¶
func (m *Method2Request) Marshal() (dAtA []byte, err error)
func (*Method2Request) ProtoMessage ¶
func (*Method2Request) ProtoMessage()
func (*Method2Request) Reset ¶
func (m *Method2Request) Reset()
func (*Method2Request) Size ¶
func (m *Method2Request) Size() (n int)
func (*Method2Request) String ¶
func (this *Method2Request) String() string
func (*Method2Request) Unmarshal ¶
func (m *Method2Request) Unmarshal(dAtA []byte) error
Click to show internal directories.
Click to hide internal directories.