Documentation
¶
Overview ¶
Package ttrpc provides an example of ttrpc client and server running in a program compiled to GOOS=wasip1
The protoc compiler must be installed in order to build the tests in this package, as well as the following extension:
$ go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@latest
For the full documentation on how to use ttrpc, see: https://github.com/containerd/ttrpc/blob/main/PROTOCOL.md
When compiling to other targets than GOOS=wasip1, importing this package has no effect.
Code generated by protoc-gen-go-ttrpc. DO NOT EDIT. source: ttrpc/ttrpc.proto
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_ttrpc_ttrpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterHelloService ¶
func RegisterHelloService(srv *ttrpc.Server, svc HelloService)
Types ¶
type HelloReply ¶
type HelloReply struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetText ¶
func (x *HelloReply) GetText() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloService ¶
type HelloService interface {
SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}
func NewHelloClient ¶
func NewHelloClient(client *ttrpc.Client) HelloService
Click to show internal directories.
Click to hide internal directories.