helloworld

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService() *server

func RegisterGreeterServer

func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)

Types

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}

GreeterClient is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterClientImpl

type GreeterClientImpl struct {
	// Sends a greeting
	SayHello func(ctx context.Context, in *HelloRequest, out *HelloReply) error
}

GreeterClientImpl is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func (*GreeterClientImpl) GetDubboStub

func (c *GreeterClientImpl) GetDubboStub(cc *grpc.ClientConn) GreeterClient

func (*GreeterClientImpl) Reference

func (c *GreeterClientImpl) Reference() string

type GreeterProviderBase

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

func (*GreeterProviderBase) GetProxyImpl

func (s *GreeterProviderBase) GetProxyImpl() protocol.Invoker

func (*GreeterProviderBase) Reference

func (c *GreeterProviderBase) Reference() string

func (*GreeterProviderBase) ServiceDesc

func (s *GreeterProviderBase) ServiceDesc() *grpc.ServiceDesc

func (*GreeterProviderBase) SetProxyImpl

func (s *GreeterProviderBase) SetProxyImpl(impl protocol.Invoker)

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}

GreeterServer is the server API for Greeter service.

type GrpcGreeterImpl

type GrpcGreeterImpl struct {
	SayHello func(ctx context.Context, in *HelloRequest, out *HelloReply) error
}

GrpcGreeterImpl used for dubbo-grpc biz client

func (*GrpcGreeterImpl) GetDubboStub

func (u *GrpcGreeterImpl) GetDubboStub(cc *grpc.ClientConn) GreeterClient

GetDubboStub ...

func (*GrpcGreeterImpl) Reference

func (u *GrpcGreeterImpl) Reference() string

Reference ...

type HelloReply

type HelloReply struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response message containing the greetings

func (*HelloReply) Descriptor

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

func (*HelloReply) GetMessage

func (m *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) Reset

func (m *HelloReply) Reset()

func (*HelloReply) String

func (m *HelloReply) String() string

func (*HelloReply) XXX_DiscardUnknown

func (m *HelloReply) XXX_DiscardUnknown()

func (*HelloReply) XXX_Marshal

func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HelloReply) XXX_Merge

func (m *HelloReply) XXX_Merge(src proto.Message)

func (*HelloReply) XXX_Size

func (m *HelloReply) XXX_Size() int

func (*HelloReply) XXX_Unmarshal

func (m *HelloReply) XXX_Unmarshal(b []byte) error

type HelloRequest

type HelloRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message containing the user's name.

func (*HelloRequest) Descriptor

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

func (*HelloRequest) GetName

func (m *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) String

func (m *HelloRequest) String() string

func (*HelloRequest) XXX_DiscardUnknown

func (m *HelloRequest) XXX_DiscardUnknown()

func (*HelloRequest) XXX_Marshal

func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HelloRequest) XXX_Merge

func (m *HelloRequest) XXX_Merge(src proto.Message)

func (*HelloRequest) XXX_Size

func (m *HelloRequest) XXX_Size() int

func (*HelloRequest) XXX_Unmarshal

func (m *HelloRequest) XXX_Unmarshal(b []byte) error

type Server

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

func NewServer

func NewServer(address string) (*Server, error)

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop()

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreeterServer) SayHello

Jump to

Keyboard shortcuts

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