Documentation ¶
Index ¶
- Variables
- func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)
- type Down
- type TunnelClient
- type TunnelServer
- type Tunnel_NewStreamClient
- type Tunnel_NewStreamServer
- type UnimplementedTunnelServer
- type UnsafeTunnelServer
- type Up
- type Up_Header
- func (*Up_Header) Descriptor() ([]byte, []int)deprecated
- func (x *Up_Header) GetDaddr() string
- func (x *Up_Header) GetDport() int32
- func (x *Up_Header) GetProtocol() string
- func (x *Up_Header) GetSaddr() string
- func (x *Up_Header) GetSni() string
- func (x *Up_Header) GetSport() int32
- func (x *Up_Header) GetTunnelId() string
- func (*Up_Header) ProtoMessage()
- func (x *Up_Header) ProtoReflect() protoreflect.Message
- func (x *Up_Header) Reset()
- func (x *Up_Header) String() string
Constants ¶
This section is empty.
Variables ¶
var File_pkg_tunnel_tunnelpb_tunnel_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTunnelServer ¶
func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)
Types ¶
type Down ¶
type Down struct { // A portion of the data for the resource. The service **may** leave `data` // empty for any given `Response`. This enables the service to inform the // client that the request is still live and more data might be coming. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // If `true`, this indicates that the send is complete. Sending any // `Request`s subsequent to one in which `finish` is `true` will // cause an error. Finish bool `protobuf:"varint,2,opt,name=finish,proto3" json:"finish,omitempty"` // contains filtered or unexported fields }
func (*Down) Descriptor
deprecated
func (*Down) ProtoMessage ¶
func (*Down) ProtoMessage()
func (*Down) ProtoReflect ¶
func (x *Down) ProtoReflect() protoreflect.Message
type TunnelClient ¶
type TunnelClient interface {
NewStream(ctx context.Context, opts ...grpc.CallOption) (Tunnel_NewStreamClient, error)
}
TunnelClient is the client API for Tunnel 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 NewTunnelClient ¶
func NewTunnelClient(cc grpc.ClientConnInterface) TunnelClient
type TunnelServer ¶
type TunnelServer interface { NewStream(Tunnel_NewStreamServer) error // contains filtered or unexported methods }
TunnelServer is the server API for Tunnel service. All implementations must embed UnimplementedTunnelServer for forward compatibility
type Tunnel_NewStreamClient ¶
type Tunnel_NewStreamServer ¶
type UnimplementedTunnelServer ¶
type UnimplementedTunnelServer struct { }
UnimplementedTunnelServer must be embedded to have forward compatible implementations.
func (UnimplementedTunnelServer) NewStream ¶
func (UnimplementedTunnelServer) NewStream(Tunnel_NewStreamServer) error
type UnsafeTunnelServer ¶
type UnsafeTunnelServer interface {
// contains filtered or unexported methods
}
UnsafeTunnelServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TunnelServer will result in compilation errors.
type Up ¶
type Up struct { // This **must** be set on the first `Request` of each `Ingress()` action. // If it is set on subsequent calls, it **must** match the value of the // first request. Header *Up_Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` // If `true`, this indicates that the send is complete. Sending any // `Request`s subsequent to one in which `finish` is `true` will // cause an error. (i.e. this allows each stream direction to be closed separately // which is also what can happen to the tunneled TCP stream anyway). Finish bool `protobuf:"varint,3,opt,name=finish,proto3" json:"finish,omitempty"` // A portion of the data for the resource. The client **may** leave `data` // empty for any given `Request`. This enables the client to inform the // service that the request is still live and more data might be coming. Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Up) Descriptor
deprecated
func (*Up) ProtoMessage ¶
func (*Up) ProtoMessage()
func (*Up) ProtoReflect ¶
func (x *Up) ProtoReflect() protoreflect.Message
type Up_Header ¶
type Up_Header struct { // <tunnel_id>.udig.io // ^^^ TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` // *must* be "TCP" for now. Saddr string `protobuf:"bytes,3,opt,name=saddr,proto3" json:"saddr,omitempty"` Daddr string `protobuf:"bytes,4,opt,name=daddr,proto3" json:"daddr,omitempty"` Sport int32 `protobuf:"varint,5,opt,name=sport,proto3" json:"sport,omitempty"` Dport int32 `protobuf:"varint,6,opt,name=dport,proto3" json:"dport,omitempty"` Sni string `protobuf:"bytes,7,opt,name=sni,proto3" json:"sni,omitempty"` // e.g. foo.bar.<tunnel_id>.udig.io // contains filtered or unexported fields }
The tunnel broker conveys some information about the original session with the client hitting the ingress. This can be useful for logging or for a second level virtual hosting if the broker supports wildcard DNS.
func (*Up_Header) Descriptor
deprecated
func (*Up_Header) GetProtocol ¶
func (*Up_Header) GetTunnelId ¶
func (*Up_Header) ProtoMessage ¶
func (*Up_Header) ProtoMessage()
func (*Up_Header) ProtoReflect ¶
func (x *Up_Header) ProtoReflect() protoreflect.Message