tunnel

package
v0.0.0-...-fb108b3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0: "tcp",
		1: "udp",
		2: "sctp",
	}
	Protocol_value = map[string]int32{
		"tcp":  0,
		"udp":  1,
		"sctp": 2,
	}
)

Enum value maps for Protocol.

View Source
var File_tunnel_proto protoreflect.FileDescriptor
View Source
var TunnelService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tunnel.TunnelService",
	HandlerType: (*TunnelServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetClientInitiatedTunnels",
			Handler:    _TunnelService_GetClientInitiatedTunnels_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "TunnelChat",
			Handler:       _TunnelService_TunnelChat_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "tunnel.proto",
}

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

Functions

func RegisterTunnelServiceServer

func RegisterTunnelServiceServer(s grpc.ServiceRegistrar, srv TunnelServiceServer)

Types

type Protocol

type Protocol int32
const (
	Protocol_tcp  Protocol = 0
	Protocol_udp  Protocol = 1
	Protocol_sctp Protocol = 2
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

func (Protocol) EnumDescriptor() ([]byte, []int)

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type Tunnel

type Tunnel struct {
	IsServerInitiated bool     `protobuf:"varint,1,opt,name=isServerInitiated,proto3" json:"isServerInitiated,omitempty"`
	Protocol          Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=tunnel.Protocol" json:"protocol,omitempty"`
	RemoteHost        string   `protobuf:"bytes,3,opt,name=RemoteHost,proto3" json:"RemoteHost,omitempty"`
	RemotePort        int32    `protobuf:"varint,4,opt,name=RemotePort,proto3" json:"RemotePort,omitempty"`
	LocalHost         string   `protobuf:"bytes,5,opt,name=LocalHost,proto3" json:"LocalHost,omitempty"`
	LocalPort         int32    `protobuf:"varint,6,opt,name=LocalPort,proto3" json:"LocalPort,omitempty"`
	// contains filtered or unexported fields
}

func (*Tunnel) Descriptor deprecated

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

Deprecated: Use Tunnel.ProtoReflect.Descriptor instead.

func (*Tunnel) GetIsServerInitiated

func (x *Tunnel) GetIsServerInitiated() bool

func (*Tunnel) GetLocalHost

func (x *Tunnel) GetLocalHost() string

func (*Tunnel) GetLocalPort

func (x *Tunnel) GetLocalPort() int32

func (*Tunnel) GetProtocol

func (x *Tunnel) GetProtocol() Protocol

func (*Tunnel) GetRemoteHost

func (x *Tunnel) GetRemoteHost() string

func (*Tunnel) GetRemotePort

func (x *Tunnel) GetRemotePort() int32

func (*Tunnel) ProtoMessage

func (*Tunnel) ProtoMessage()

func (*Tunnel) ProtoReflect

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

func (*Tunnel) Reset

func (x *Tunnel) Reset()

func (*Tunnel) String

func (x *Tunnel) String() string

type TunnelGetPayload

type TunnelGetPayload struct {
	ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelGetPayload) Descriptor deprecated

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

Deprecated: Use TunnelGetPayload.ProtoReflect.Descriptor instead.

func (*TunnelGetPayload) GetClientId

func (x *TunnelGetPayload) GetClientId() string

func (*TunnelGetPayload) ProtoMessage

func (*TunnelGetPayload) ProtoMessage()

func (*TunnelGetPayload) ProtoReflect

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

func (*TunnelGetPayload) Reset

func (x *TunnelGetPayload) Reset()

func (*TunnelGetPayload) String

func (x *TunnelGetPayload) String() string

type TunnelList

type TunnelList struct {
	Tunnel []*Tunnel `protobuf:"bytes,1,rep,name=tunnel,proto3" json:"tunnel,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelList) Descriptor deprecated

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

Deprecated: Use TunnelList.ProtoReflect.Descriptor instead.

func (*TunnelList) GetTunnel

func (x *TunnelList) GetTunnel() []*Tunnel

func (*TunnelList) ProtoMessage

func (*TunnelList) ProtoMessage()

func (*TunnelList) ProtoReflect

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

func (*TunnelList) Reset

func (x *TunnelList) Reset()

func (*TunnelList) String

func (x *TunnelList) String() string

type TunnelMessage

type TunnelMessage struct {
	Content []byte  `protobuf:"bytes,1,opt,name=content,proto3,oneof" json:"content,omitempty"`
	Tunnel  *Tunnel `protobuf:"bytes,2,opt,name=tunnel,proto3" json:"tunnel,omitempty"`
	Closed  bool    `protobuf:"varint,3,opt,name=closed,proto3" json:"closed,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelMessage) Descriptor deprecated

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

Deprecated: Use TunnelMessage.ProtoReflect.Descriptor instead.

func (*TunnelMessage) GetClosed

func (x *TunnelMessage) GetClosed() bool

func (*TunnelMessage) GetContent

func (x *TunnelMessage) GetContent() []byte

func (*TunnelMessage) GetTunnel

func (x *TunnelMessage) GetTunnel() *Tunnel

func (*TunnelMessage) ProtoMessage

func (*TunnelMessage) ProtoMessage()

func (*TunnelMessage) ProtoReflect

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

func (*TunnelMessage) Reset

func (x *TunnelMessage) Reset()

func (*TunnelMessage) String

func (x *TunnelMessage) String() string

type TunnelServiceClient

type TunnelServiceClient interface {
	GetClientInitiatedTunnels(ctx context.Context, in *TunnelGetPayload, opts ...grpc.CallOption) (*TunnelList, error)
	TunnelChat(ctx context.Context, opts ...grpc.CallOption) (TunnelService_TunnelChatClient, error)
}

TunnelServiceClient is the client API for TunnelService 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 TunnelServiceServer

type TunnelServiceServer interface {
	GetClientInitiatedTunnels(context.Context, *TunnelGetPayload) (*TunnelList, error)
	TunnelChat(TunnelService_TunnelChatServer) error
	// contains filtered or unexported methods
}

TunnelServiceServer is the server API for TunnelService service. All implementations must embed UnimplementedTunnelServiceServer for forward compatibility

type TunnelService_TunnelChatClient

type TunnelService_TunnelChatClient interface {
	Send(*TunnelMessage) error
	Recv() (*TunnelMessage, error)
	grpc.ClientStream
}

type TunnelService_TunnelChatServer

type TunnelService_TunnelChatServer interface {
	Send(*TunnelMessage) error
	Recv() (*TunnelMessage, error)
	grpc.ServerStream
}

type UnimplementedTunnelServiceServer

type UnimplementedTunnelServiceServer struct {
}

UnimplementedTunnelServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTunnelServiceServer) GetClientInitiatedTunnels

func (UnimplementedTunnelServiceServer) TunnelChat

type UnsafeTunnelServiceServer

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

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

Jump to

Keyboard shortcuts

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