tunnelpb

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Down.ProtoReflect.Descriptor instead.

func (*Down) GetData

func (x *Down) GetData() []byte

func (*Down) GetFinish

func (x *Down) GetFinish() bool

func (*Down) ProtoMessage

func (*Down) ProtoMessage()

func (*Down) ProtoReflect

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

func (*Down) Reset

func (x *Down) Reset()

func (*Down) String

func (x *Down) String() string

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_NewStreamClient interface {
	Send(*Up) error
	Recv() (*Down, error)
	grpc.ClientStream
}

type Tunnel_NewStreamServer

type Tunnel_NewStreamServer interface {
	Send(*Down) error
	Recv() (*Up, error)
	grpc.ServerStream
}

type UnimplementedTunnelServer

type UnimplementedTunnelServer struct {
}

UnimplementedTunnelServer must be embedded to have forward compatible implementations.

func (UnimplementedTunnelServer) NewStream

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) Descriptor() ([]byte, []int)

Deprecated: Use Up.ProtoReflect.Descriptor instead.

func (*Up) GetData

func (x *Up) GetData() []byte

func (*Up) GetFinish

func (x *Up) GetFinish() bool

func (*Up) GetHeader

func (x *Up) GetHeader() *Up_Header

func (*Up) ProtoMessage

func (*Up) ProtoMessage()

func (*Up) ProtoReflect

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

func (*Up) Reset

func (x *Up) Reset()

func (*Up) String

func (x *Up) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Up_Header.ProtoReflect.Descriptor instead.

func (*Up_Header) GetDaddr

func (x *Up_Header) GetDaddr() string

func (*Up_Header) GetDport

func (x *Up_Header) GetDport() int32

func (*Up_Header) GetProtocol

func (x *Up_Header) GetProtocol() string

func (*Up_Header) GetSaddr

func (x *Up_Header) GetSaddr() string

func (*Up_Header) GetSni

func (x *Up_Header) GetSni() string

func (*Up_Header) GetSport

func (x *Up_Header) GetSport() int32

func (*Up_Header) GetTunnelId

func (x *Up_Header) GetTunnelId() string

func (*Up_Header) ProtoMessage

func (*Up_Header) ProtoMessage()

func (*Up_Header) ProtoReflect

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

func (*Up_Header) Reset

func (x *Up_Header) Reset()

func (*Up_Header) String

func (x *Up_Header) String() string

Jump to

Keyboard shortcuts

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