Documentation
¶
Index ¶
- Variables
- type Cancel
- type End
- type Frame
- func (*Frame) Descriptor() ([]byte, []int)deprecated
- func (x *Frame) GetBody() []byte
- func (x *Frame) GetCall() uint32
- func (x *Frame) GetCancel() *Cancel
- func (x *Frame) GetEnd() *End
- func (x *Frame) GetKind() isFrame_Kind
- func (x *Frame) GetRequest() *RequestHead
- func (x *Frame) GetResponse() *ResponseHead
- func (*Frame) ProtoMessage()
- func (x *Frame) ProtoReflect() protoreflect.Message
- func (x *Frame) Reset()
- func (x *Frame) String() string
- type Frame_Body
- type Frame_Cancel
- type Frame_End
- type Frame_Request
- type Frame_Response
- type Header
- type RequestHead
- func (*RequestHead) Descriptor() ([]byte, []int)deprecated
- func (x *RequestHead) GetHeaders() []*Header
- func (x *RequestHead) GetMethod() string
- func (x *RequestHead) GetTarget() string
- func (*RequestHead) ProtoMessage()
- func (x *RequestHead) ProtoReflect() protoreflect.Message
- func (x *RequestHead) Reset()
- func (x *RequestHead) String() string
- type ResponseHead
- func (*ResponseHead) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseHead) GetHeaders() []*Header
- func (x *ResponseHead) GetStatus() uint32
- func (*ResponseHead) ProtoMessage()
- func (x *ResponseHead) ProtoReflect() protoreflect.Message
- func (x *ResponseHead) Reset()
- func (x *ResponseHead) String() string
Constants ¶
This section is empty.
Variables ¶
var File_syncplane_tunnel_v1_tunnel_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Cancel ¶
type Cancel struct {
// contains filtered or unexported fields
}
A request to abandon a call.
func (*Cancel) Descriptor
deprecated
func (*Cancel) ProtoMessage ¶
func (*Cancel) ProtoMessage()
func (*Cancel) ProtoReflect ¶
func (x *Cancel) ProtoReflect() protoreflect.Message
type End ¶
type End struct {
// Empty when the sender's half finished normally. Otherwise a
// human-readable reason the call failed below HTTP, such as a handler that
// aborted mid-response; the receiver treats the call as a network failure.
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
The end of one side of a call.
func (*End) Descriptor
deprecated
func (*End) ProtoMessage ¶
func (*End) ProtoMessage()
func (*End) ProtoReflect ¶
func (x *End) ProtoReflect() protoreflect.Message
type Frame ¶
type Frame struct {
// Identifies the call this frame belongs to. The client chooses it when it
// sends `request`. It must be non-zero and must not match any call still in
// flight on the same channel.
Call uint32 `protobuf:"varint,1,opt,name=call,proto3" json:"call,omitempty"`
// Types that are valid to be assigned to Kind:
//
// *Frame_Request
// *Frame_Body
// *Frame_Response
// *Frame_End
// *Frame_Cancel
Kind isFrame_Kind `protobuf_oneof:"kind"`
// contains filtered or unexported fields
}
One message on a tunnel: a channel that carries HTTP exchanges as discrete, ordered, reliable messages instead of over a socket. Each message on the channel holds exactly one Frame in the binary protobuf encoding.
A channel carries one or more calls, told apart by `call`. A client may open one channel for each call or multiplex many calls over one channel; the server treats both the same.
A call runs in this order:
1. The client sends `request`, then zero or more `body` frames, then `end`. 2. The server sends `response`, then zero or more `body` frames, then `end`.
The server may start its half before the client finishes its own. Either side may send `end` with an error at any point to fail the call. The client may send `cancel` at any point after `request` to abandon the call; the server then stops the handler and sends nothing more for that call, although frames already in flight can still arrive. A side ignores frames for a call it does not know or has finished.
The protocol has no flow control of its own. On a multiplexed channel, a receiver that stops reading stalls every call on that channel.
func (*Frame) Descriptor
deprecated
func (*Frame) GetRequest ¶
func (x *Frame) GetRequest() *RequestHead
func (*Frame) GetResponse ¶
func (x *Frame) GetResponse() *ResponseHead
func (*Frame) ProtoMessage ¶
func (*Frame) ProtoMessage()
func (*Frame) ProtoReflect ¶
func (x *Frame) ProtoReflect() protoreflect.Message
type Frame_Body ¶
type Frame_Body struct {
// Carries the next chunk of the request body (client to server) or the
// response body (server to client). A sender should keep chunks at or
// below 64 KiB: some channels refuse or split larger messages.
Body []byte `protobuf:"bytes,3,opt,name=body,proto3,oneof"`
}
type Frame_Cancel ¶
type Frame_Cancel struct {
// Abandons the call. Client to server only.
Cancel *Cancel `protobuf:"bytes,6,opt,name=cancel,proto3,oneof"`
}
type Frame_End ¶
type Frame_End struct {
// Ends the sender's half of the call.
End *End `protobuf:"bytes,5,opt,name=end,proto3,oneof"`
}
type Frame_Request ¶
type Frame_Request struct {
// Opens the call. Client to server only, and only as the first frame of
// the call.
Request *RequestHead `protobuf:"bytes,2,opt,name=request,proto3,oneof"`
}
type Frame_Response ¶
type Frame_Response struct {
// Starts the response. Server to client only, before any response
// `body` frame.
Response *ResponseHead `protobuf:"bytes,4,opt,name=response,proto3,oneof"`
}
type Header ¶
type Header struct {
// The header name. Case-insensitive.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
One HTTP header and all its values, in the order they appear.
func (*Header) Descriptor
deprecated
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type RequestHead ¶
type RequestHead struct {
// The HTTP method, such as "POST".
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// The request target: an absolute path with an optional query, such as
// "/syncplane.v1.SyncService/Push". It carries no scheme or host.
Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
Headers []*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
// contains filtered or unexported fields
}
The start of an HTTP request.
func (*RequestHead) Descriptor
deprecated
func (*RequestHead) Descriptor() ([]byte, []int)
Deprecated: Use RequestHead.ProtoReflect.Descriptor instead.
func (*RequestHead) GetHeaders ¶
func (x *RequestHead) GetHeaders() []*Header
func (*RequestHead) GetMethod ¶
func (x *RequestHead) GetMethod() string
func (*RequestHead) GetTarget ¶
func (x *RequestHead) GetTarget() string
func (*RequestHead) ProtoMessage ¶
func (*RequestHead) ProtoMessage()
func (*RequestHead) ProtoReflect ¶
func (x *RequestHead) ProtoReflect() protoreflect.Message
func (*RequestHead) Reset ¶
func (x *RequestHead) Reset()
func (*RequestHead) String ¶
func (x *RequestHead) String() string
type ResponseHead ¶
type ResponseHead struct {
// The HTTP status code, from 200 to 599.
Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
Headers []*Header `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
// contains filtered or unexported fields
}
The start of an HTTP response.
func (*ResponseHead) Descriptor
deprecated
func (*ResponseHead) Descriptor() ([]byte, []int)
Deprecated: Use ResponseHead.ProtoReflect.Descriptor instead.
func (*ResponseHead) GetHeaders ¶
func (x *ResponseHead) GetHeaders() []*Header
func (*ResponseHead) GetStatus ¶
func (x *ResponseHead) GetStatus() uint32
func (*ResponseHead) ProtoMessage ¶
func (*ResponseHead) ProtoMessage()
func (*ResponseHead) ProtoReflect ¶
func (x *ResponseHead) ProtoReflect() protoreflect.Message
func (*ResponseHead) Reset ¶
func (x *ResponseHead) Reset()
func (*ResponseHead) String ¶
func (x *ResponseHead) String() string