helloworld

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_helloworld_proto protoreflect.FileDescriptor
View Source
var GreeterServer_ServiceDesc = server.ServiceDesc{
	ServiceName: "trpc.helloworld.Greeter",
	HandlerType: ((*GreeterService)(nil)),
	Methods: []server.Method{
		{
			Name: "/trpc.helloworld.Greeter/Hello",
			Func: GreeterService_Hello_Handler,
		},
		{
			Name: "/trpc.helloworld.Greeter/HelloAgain",
			Func: GreeterService_HelloAgain_Handler,
		},
	},
}

GreeterServer_ServiceDesc descriptor for server.RegisterService.

View Source
var NewGreeterClientProxy = func(opts ...client.Option) GreeterClientProxy {
	return &GreeterClientProxyImpl{client: client.DefaultClient, opts: opts}
}

Functions

func GreeterService_HelloAgain_Handler

func GreeterService_HelloAgain_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

func GreeterService_Hello_Handler

func GreeterService_Hello_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

func RegisterGreeterService

func RegisterGreeterService(s server.Service, svr GreeterService)

RegisterGreeterService registers service.

Types

type GreeterClientProxy

type GreeterClientProxy interface {
	Hello(ctx context.Context, req *HelloRequest, opts ...client.Option) (rsp *HelloReply, err error)

	HelloAgain(ctx context.Context, req *HelloRequest, opts ...client.Option) (rsp *HelloReply, err error)
}

GreeterClientProxy defines service client proxy

type GreeterClientProxyImpl

type GreeterClientProxyImpl struct {
	// contains filtered or unexported fields
}

func (*GreeterClientProxyImpl) Hello

func (*GreeterClientProxyImpl) HelloAgain

func (c *GreeterClientProxyImpl) HelloAgain(ctx context.Context, req *HelloRequest, opts ...client.Option) (*HelloReply, error)

type GreeterService

type GreeterService interface {
	Hello(ctx context.Context, req *HelloRequest) (*HelloReply, error)

	HelloAgain(ctx context.Context, req *HelloRequest) (*HelloReply, error)
}

GreeterService defines service.

type HelloReply

type HelloReply struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloReply) Descriptor deprecated

func (*HelloReply) Descriptor() ([]byte, []int)

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMsg

func (x *HelloReply) GetMsg() 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 {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest) Descriptor deprecated

func (*HelloRequest) Descriptor() ([]byte, []int)

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetMsg

func (x *HelloRequest) GetMsg() 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 UnimplementedGreeter

type UnimplementedGreeter struct{}

func (*UnimplementedGreeter) Hello

func (*UnimplementedGreeter) HelloAgain

func (s *UnimplementedGreeter) HelloAgain(ctx context.Context, req *HelloRequest) (*HelloReply, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL