Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHTTPOverGRPCServer(s grpc.ServiceRegistrar, srv HTTPOverGRPCServer)
- type HTTPOverGRPCClient
- type HTTPOverGRPCServer
- type Header
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() []byte
- func (x *Request) GetHeaders() []*Header
- func (x *Request) GetMethod() string
- func (x *Request) GetUrl() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetBody() []byte
- func (x *Response) GetHeaders() []*Header
- func (x *Response) GetStatus() int32
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type UnimplementedHTTPOverGRPCServer
- type UnsafeHTTPOverGRPCServer
Constants ¶
const (
HTTPOverGRPC_HTTPRequest_FullMethodName = "/httpovergrpc.HTTPOverGRPC/HTTPRequest"
)
Variables ¶
var File_httpovergrpc_proto protoreflect.FileDescriptor
var HTTPOverGRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "httpovergrpc.HTTPOverGRPC", HandlerType: (*HTTPOverGRPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HTTPRequest", Handler: _HTTPOverGRPC_HTTPRequest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "httpovergrpc.proto", }
HTTPOverGRPC_ServiceDesc is the grpc.ServiceDesc for HTTPOverGRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHTTPOverGRPCServer ¶
func RegisterHTTPOverGRPCServer(s grpc.ServiceRegistrar, srv HTTPOverGRPCServer)
Types ¶
type HTTPOverGRPCClient ¶
type HTTPOverGRPCClient interface { // Perform the given HTTP request over gRPC. HTTPRequest(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) }
HTTPOverGRPCClient is the client API for HTTPOverGRPC 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 NewHTTPOverGRPCClient ¶
func NewHTTPOverGRPCClient(cc grpc.ClientConnInterface) HTTPOverGRPCClient
type HTTPOverGRPCServer ¶
type HTTPOverGRPCServer interface { // Perform the given HTTP request over gRPC. HTTPRequest(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
HTTPOverGRPCServer is the server API for HTTPOverGRPC service. All implementations must embed UnimplementedHTTPOverGRPCServer for forward compatibility.
type Header ¶
type Header struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Represents an HTTP 1.1 header.
func (*Header) Descriptor
deprecated
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` Headers []*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Represents an HTTP 1.1 request.
func (*Request) Descriptor
deprecated
func (*Request) GetHeaders ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Headers []*Header `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Represents an HTTP 1.1 response.
func (*Response) Descriptor
deprecated
func (*Response) GetHeaders ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedHTTPOverGRPCServer ¶
type UnimplementedHTTPOverGRPCServer struct{}
UnimplementedHTTPOverGRPCServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedHTTPOverGRPCServer) HTTPRequest ¶
type UnsafeHTTPOverGRPCServer ¶
type UnsafeHTTPOverGRPCServer interface {
// contains filtered or unexported methods
}
UnsafeHTTPOverGRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HTTPOverGRPCServer will result in compilation errors.