igrpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_igrpc_proto protoreflect.FileDescriptor
View Source
var RemoteService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "igrpc.RemoteService",
	HandlerType: (*RemoteServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CallImageProcessing",
			Handler:    _RemoteService_CallImageProcessing_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "igrpc.proto",
}

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

Functions

func RegisterRemoteServiceServer

func RegisterRemoteServiceServer(s grpc.ServiceRegistrar, srv RemoteServiceServer)

Types

type Client

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

func NewClient

func NewClient(address string) (*Client, error)

func (*Client) CallImageProcessing

func (c *Client) CallImageProcessing(
	req *RequestImageProcessing) (*ResponseImageProcessing, error)

func (*Client) Close

func (c *Client) Close()

type RemoteServiceClient

type RemoteServiceClient interface {
	CallImageProcessing(ctx context.Context, in *RequestImageProcessing, opts ...grpc.CallOption) (*ResponseImageProcessing, error)
}

RemoteServiceClient is the client API for RemoteService 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.

type RemoteServiceServer

type RemoteServiceServer interface {
	CallImageProcessing(context.Context, *RequestImageProcessing) (*ResponseImageProcessing, error)
	// contains filtered or unexported methods
}

RemoteServiceServer is the server API for RemoteService service. All implementations must embed UnimplementedRemoteServiceServer for forward compatibility

type RequestImageProcessing

type RequestImageProcessing struct {
	MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	Left      uint32 `protobuf:"varint,2,opt,name=left,proto3" json:"left,omitempty"`
	Top       uint32 `protobuf:"varint,3,opt,name=top,proto3" json:"top,omitempty"`
	Right     uint32 `protobuf:"varint,4,opt,name=right,proto3" json:"right,omitempty"`
	Bottom    uint32 `protobuf:"varint,5,opt,name=bottom,proto3" json:"bottom,omitempty"`
	Quality   uint32 `protobuf:"varint,6,opt,name=quality,proto3" json:"quality,omitempty"`
	Payload   []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestImageProcessing) Descriptor deprecated

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

Deprecated: Use RequestImageProcessing.ProtoReflect.Descriptor instead.

func (*RequestImageProcessing) GetBottom

func (x *RequestImageProcessing) GetBottom() uint32

func (*RequestImageProcessing) GetLeft

func (x *RequestImageProcessing) GetLeft() uint32

func (*RequestImageProcessing) GetMessageId

func (x *RequestImageProcessing) GetMessageId() string

func (*RequestImageProcessing) GetPayload

func (x *RequestImageProcessing) GetPayload() []byte

func (*RequestImageProcessing) GetQuality

func (x *RequestImageProcessing) GetQuality() uint32

func (*RequestImageProcessing) GetRight

func (x *RequestImageProcessing) GetRight() uint32

func (*RequestImageProcessing) GetTop

func (x *RequestImageProcessing) GetTop() uint32

func (*RequestImageProcessing) ProtoMessage

func (*RequestImageProcessing) ProtoMessage()

func (*RequestImageProcessing) ProtoReflect

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

func (*RequestImageProcessing) Reset

func (x *RequestImageProcessing) Reset()

func (*RequestImageProcessing) String

func (x *RequestImageProcessing) String() string

type ResponseImageProcessing

type ResponseImageProcessing struct {
	ReqMessageId string `protobuf:"bytes,1,opt,name=req_message_id,json=reqMessageId,proto3" json:"req_message_id,omitempty"`
	Success      bool   `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	SrcWidth     uint32 `protobuf:"varint,3,opt,name=src_width,json=srcWidth,proto3" json:"src_width,omitempty"`
	SrcHeight    uint32 `protobuf:"varint,4,opt,name=src_height,json=srcHeight,proto3" json:"src_height,omitempty"`
	DstWidth     uint32 `protobuf:"varint,5,opt,name=dst_width,json=dstWidth,proto3" json:"dst_width,omitempty"`
	DstHeight    uint32 `protobuf:"varint,6,opt,name=dst_height,json=dstHeight,proto3" json:"dst_height,omitempty"`
	Message      string `protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"`
	Payload      []byte `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseImageProcessing) Descriptor deprecated

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

Deprecated: Use ResponseImageProcessing.ProtoReflect.Descriptor instead.

func (*ResponseImageProcessing) GetDstHeight

func (x *ResponseImageProcessing) GetDstHeight() uint32

func (*ResponseImageProcessing) GetDstWidth

func (x *ResponseImageProcessing) GetDstWidth() uint32

func (*ResponseImageProcessing) GetMessage

func (x *ResponseImageProcessing) GetMessage() string

func (*ResponseImageProcessing) GetPayload

func (x *ResponseImageProcessing) GetPayload() []byte

func (*ResponseImageProcessing) GetReqMessageId

func (x *ResponseImageProcessing) GetReqMessageId() string

func (*ResponseImageProcessing) GetSrcHeight

func (x *ResponseImageProcessing) GetSrcHeight() uint32

func (*ResponseImageProcessing) GetSrcWidth

func (x *ResponseImageProcessing) GetSrcWidth() uint32

func (*ResponseImageProcessing) GetSuccess

func (x *ResponseImageProcessing) GetSuccess() bool

func (*ResponseImageProcessing) ProtoMessage

func (*ResponseImageProcessing) ProtoMessage()

func (*ResponseImageProcessing) ProtoReflect

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

func (*ResponseImageProcessing) Reset

func (x *ResponseImageProcessing) Reset()

func (*ResponseImageProcessing) String

func (x *ResponseImageProcessing) String() string

type Server

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

func NewServer

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

func (*Server) Close

func (s *Server) Close()

func (*Server) StartListenAndServe

func (s *Server) StartListenAndServe() error

type UnimplementedRemoteServiceServer

type UnimplementedRemoteServiceServer struct {
}

UnimplementedRemoteServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRemoteServiceServer) CallImageProcessing

type UnsafeRemoteServiceServer

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

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

Jump to

Keyboard shortcuts

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