helloworld

package
v0.0.0-...-1278c99 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_helloworld_helloword_proto protoreflect.FileDescriptor
View Source
var File_helloworld_stock_proto protoreflect.FileDescriptor
View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hellostreamingworld.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Greeter_SayHello_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SayHelloReplyStream",
			Handler:       _Greeter_SayHelloReplyStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SayHelloRequestStream",
			Handler:       _Greeter_SayHelloRequestStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "SayHelloStream",
			Handler:       _Greeter_SayHelloStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "helloworld/helloword.proto",
}

Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Stock_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.Stock",
	HandlerType: (*StockServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Stock_SayHello_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Channle",
			Handler:       _Stock_Channle_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "helloworld/stock.proto",
}

Stock_ServiceDesc is the grpc.ServiceDesc for Stock service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

func RegisterStockHTTPServer

func RegisterStockHTTPServer(s *http.Server, srv StockHTTPServer)

func RegisterStockServer

func RegisterStockServer(s grpc.ServiceRegistrar, srv StockServer)

Types

type GreeterClient

type GreeterClient interface {
	// Sends multiple greetings
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	SayHelloReplyStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Greeter_SayHelloReplyStreamClient, error)
	SayHelloRequestStream(ctx context.Context, opts ...grpc.CallOption) (Greeter_SayHelloRequestStreamClient, error)
	SayHelloStream(ctx context.Context, opts ...grpc.CallOption) (Greeter_SayHelloStreamClient, error)
}

GreeterClient is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterServer

type GreeterServer interface {
	// Sends multiple greetings
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	SayHelloReplyStream(*HelloRequest, Greeter_SayHelloReplyStreamServer) error
	SayHelloRequestStream(Greeter_SayHelloRequestStreamServer) error
	SayHelloStream(Greeter_SayHelloStreamServer) error
	// contains filtered or unexported methods
}

GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility

type Greeter_SayHelloReplyStreamClient

type Greeter_SayHelloReplyStreamClient interface {
	Recv() (*HelloReply, error)
	grpc.ClientStream
}

type Greeter_SayHelloReplyStreamServer

type Greeter_SayHelloReplyStreamServer interface {
	Send(*HelloReply) error
	grpc.ServerStream
}

type Greeter_SayHelloRequestStreamClient

type Greeter_SayHelloRequestStreamClient interface {
	Send(*HelloRequest) error
	CloseAndRecv() (*HelloReply, error)
	grpc.ClientStream
}

type Greeter_SayHelloRequestStreamServer

type Greeter_SayHelloRequestStreamServer interface {
	SendAndClose(*HelloReply) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type Greeter_SayHelloStreamClient

type Greeter_SayHelloStreamClient interface {
	Send(*HelloRequest) error
	Recv() (*HelloReply, error)
	grpc.ClientStream
}

type Greeter_SayHelloStreamServer

type Greeter_SayHelloStreamServer interface {
	Send(*HelloReply) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type HelloReply

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

A response message containing a greeting

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() 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"`
	NumGreetings string `protobuf:"bytes,2,opt,name=num_greetings,json=numGreetings,proto3" json:"num_greetings,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name and how many greetings they want.

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) GetNumGreetings

func (x *HelloRequest) GetNumGreetings() 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 StockClient

type StockClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *StockRequest, opts ...grpc.CallOption) (*StockReply, error)
	Channle(ctx context.Context, opts ...grpc.CallOption) (Stock_ChannleClient, error)
}

StockClient is the client API for Stock service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewStockClient

func NewStockClient(cc grpc.ClientConnInterface) StockClient

type StockHTTPClient

type StockHTTPClient interface {
	SayHello(ctx context.Context, req *StockRequest, opts ...http.CallOption) (rsp *StockReply, err error)
}

func NewStockHTTPClient

func NewStockHTTPClient(client *http.Client) StockHTTPClient

type StockHTTPClientImpl

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

func (*StockHTTPClientImpl) SayHello

func (c *StockHTTPClientImpl) SayHello(ctx context.Context, in *StockRequest, opts ...http.CallOption) (*StockReply, error)

type StockHTTPServer

type StockHTTPServer interface {
	SayHello(context.Context, *StockRequest) (*StockReply, error)
}

type StockReply

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

The response message containing the greetings

func (*StockReply) Descriptor deprecated

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

Deprecated: Use StockReply.ProtoReflect.Descriptor instead.

func (*StockReply) GetMessage

func (x *StockReply) GetMessage() string

func (*StockReply) ProtoMessage

func (*StockReply) ProtoMessage()

func (*StockReply) ProtoReflect

func (x *StockReply) ProtoReflect() protoreflect.Message

func (*StockReply) Reset

func (x *StockReply) Reset()

func (*StockReply) String

func (x *StockReply) String() string

type StockRequest

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

The request message containing the user's name.

func (*StockRequest) Descriptor deprecated

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

Deprecated: Use StockRequest.ProtoReflect.Descriptor instead.

func (*StockRequest) GetName

func (x *StockRequest) GetName() string

func (*StockRequest) ProtoMessage

func (*StockRequest) ProtoMessage()

func (*StockRequest) ProtoReflect

func (x *StockRequest) ProtoReflect() protoreflect.Message

func (*StockRequest) Reset

func (x *StockRequest) Reset()

func (*StockRequest) String

func (x *StockRequest) String() string

type StockServer

type StockServer interface {
	// Sends a greeting
	SayHello(context.Context, *StockRequest) (*StockReply, error)
	Channle(Stock_ChannleServer) error
	// contains filtered or unexported methods
}

StockServer is the server API for Stock service. All implementations must embed UnimplementedStockServer for forward compatibility

type Stock_ChannleClient

type Stock_ChannleClient interface {
	Send(*StockRequest) error
	Recv() (*StockReply, error)
	grpc.ClientStream
}

type Stock_ChannleServer

type Stock_ChannleServer interface {
	Send(*StockReply) error
	Recv() (*StockRequest, error)
	grpc.ServerStream
}

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) SayHello

func (UnimplementedGreeterServer) SayHelloReplyStream

func (UnimplementedGreeterServer) SayHelloRequestStream

func (UnimplementedGreeterServer) SayHelloStream

type UnimplementedStockServer

type UnimplementedStockServer struct {
}

UnimplementedStockServer must be embedded to have forward compatible implementations.

func (UnimplementedStockServer) Channle

func (UnimplementedStockServer) SayHello

type UnsafeGreeterServer

type UnsafeGreeterServer interface {
	// contains filtered or unexported methods
}

UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.

type UnsafeStockServer

type UnsafeStockServer interface {
	// contains filtered or unexported methods
}

UnsafeStockServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StockServer will result in compilation errors.

Jump to

Keyboard shortcuts

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