proto

package
v0.0.0-...-582e486 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "atom.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Hello",
			Handler:    _Greeter_Hello_Handler,
		},
		{
			MethodName: "Echo",
			Handler:    _Greeter_Echo_Handler,
		},
		{
			MethodName: "EchoError",
			Handler:    _Greeter_EchoError_Handler,
		},
		{
			MethodName: "EchoSlow",
			Handler:    _Greeter_EchoSlow_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "atom.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)

Functions

func RegisterGreeterHTTPServer

func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

Types

type EchoReply

type EchoReply struct {
	Param           string `protobuf:"bytes,1,opt,name=param,proto3" json:"param,omitempty"`
	ApplicationName string `protobuf:"bytes,2,opt,name=applicationName,proto3" json:"applicationName,omitempty"`
	SleepTime       string `protobuf:"bytes,3,opt,name=sleepTime,proto3" json:"sleepTime,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoReply) Descriptor deprecated

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

Deprecated: Use EchoReply.ProtoReflect.Descriptor instead.

func (*EchoReply) GetApplicationName

func (x *EchoReply) GetApplicationName() string

func (*EchoReply) GetParam

func (x *EchoReply) GetParam() string

func (*EchoReply) GetSleepTime

func (x *EchoReply) GetSleepTime() string

func (*EchoReply) ProtoMessage

func (*EchoReply) ProtoMessage()

func (*EchoReply) ProtoReflect

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

func (*EchoReply) Reset

func (x *EchoReply) Reset()

func (*EchoReply) String

func (x *EchoReply) String() string

type EchoRequest

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

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetParam

func (x *EchoRequest) GetParam() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset

func (x *EchoRequest) Reset()

func (*EchoRequest) String

func (x *EchoRequest) String() string

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	Hello(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HelloReply, error)
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error)
	EchoError(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error)
	EchoSlow(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, 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 GreeterHTTPClient

type GreeterHTTPClient interface {
	Echo(ctx context.Context, req *EchoRequest, opts ...http.CallOption) (rsp *EchoReply, err error)
	EchoError(ctx context.Context, req *EchoRequest, opts ...http.CallOption) (rsp *EchoReply, err error)
	EchoSlow(ctx context.Context, req *EchoRequest, opts ...http.CallOption) (rsp *EchoReply, err error)
	Hello(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *HelloReply, err error)
}

func NewGreeterHTTPClient

func NewGreeterHTTPClient(client *http.Client) GreeterHTTPClient

type GreeterHTTPClientImpl

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

func (*GreeterHTTPClientImpl) Echo

func (*GreeterHTTPClientImpl) EchoError

func (c *GreeterHTTPClientImpl) EchoError(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)

func (*GreeterHTTPClientImpl) EchoSlow

func (c *GreeterHTTPClientImpl) EchoSlow(ctx context.Context, in *EchoRequest, opts ...http.CallOption) (*EchoReply, error)

func (*GreeterHTTPClientImpl) Hello

type GreeterHTTPServer

type GreeterHTTPServer interface {
	Echo(context.Context, *EchoRequest) (*EchoReply, error)
	EchoError(context.Context, *EchoRequest) (*EchoReply, error)
	EchoSlow(context.Context, *EchoRequest) (*EchoReply, error)
	Hello(context.Context, *emptypb.Empty) (*HelloReply, error)
}

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	Hello(context.Context, *emptypb.Empty) (*HelloReply, error)
	Echo(context.Context, *EchoRequest) (*EchoReply, error)
	EchoError(context.Context, *EchoRequest) (*EchoReply, error)
	EchoSlow(context.Context, *EchoRequest) (*EchoReply, error)
	// contains filtered or unexported methods
}

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

type HelloReply

type HelloReply 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 (*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 UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) Echo

func (UnimplementedGreeterServer) EchoError

func (UnimplementedGreeterServer) EchoSlow

func (UnimplementedGreeterServer) Hello

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.

Jump to

Keyboard shortcuts

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