proto

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_p2p_proto_p2p_proto protoreflect.FileDescriptor
View Source
var P2P_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.P2P",
	HandlerType: (*P2PServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OpenTunnel",
			Handler:    _P2P_OpenTunnel_Handler,
		},
		{
			MethodName: "CloseTunnel",
			Handler:    _P2P_CloseTunnel_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _P2P_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "p2p/proto/p2p.proto",
}

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

Functions

func RegisterP2PServer

func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer)

Types

type CloseTunnelReply

type CloseTunnelReply struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseTunnelReply) Descriptor deprecated

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

Deprecated: Use CloseTunnelReply.ProtoReflect.Descriptor instead.

func (*CloseTunnelReply) GetOk

func (x *CloseTunnelReply) GetOk() bool

func (*CloseTunnelReply) ProtoMessage

func (*CloseTunnelReply) ProtoMessage()

func (*CloseTunnelReply) ProtoReflect

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

func (*CloseTunnelReply) Reset

func (x *CloseTunnelReply) Reset()

func (*CloseTunnelReply) String

func (x *CloseTunnelReply) String() string

type CloseTunnelRequest

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

func (*CloseTunnelRequest) Descriptor deprecated

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

Deprecated: Use CloseTunnelRequest.ProtoReflect.Descriptor instead.

func (*CloseTunnelRequest) GetId

func (x *CloseTunnelRequest) GetId() string

func (*CloseTunnelRequest) ProtoMessage

func (*CloseTunnelRequest) ProtoMessage()

func (*CloseTunnelRequest) ProtoReflect

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

func (*CloseTunnelRequest) Reset

func (x *CloseTunnelRequest) Reset()

func (*CloseTunnelRequest) String

func (x *CloseTunnelRequest) String() string

type OpenTunnelReply

type OpenTunnelReply struct {
	Ok bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// endpoint is the tunnel handle (not interpreted by GOST):
	// v1 is a locally dialable TCP "host:port" (no scheme).
	Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Error    string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // human-readable reason when ok == false
	// contains filtered or unexported fields
}

id is assigned by the server; the client must return it verbatim when closing the tunnel.

func (*OpenTunnelReply) Descriptor deprecated

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

Deprecated: Use OpenTunnelReply.ProtoReflect.Descriptor instead.

func (*OpenTunnelReply) GetEndpoint

func (x *OpenTunnelReply) GetEndpoint() string

func (*OpenTunnelReply) GetError

func (x *OpenTunnelReply) GetError() string

func (*OpenTunnelReply) GetId

func (x *OpenTunnelReply) GetId() string

func (*OpenTunnelReply) GetOk

func (x *OpenTunnelReply) GetOk() bool

func (*OpenTunnelReply) ProtoMessage

func (*OpenTunnelReply) ProtoMessage()

func (*OpenTunnelReply) ProtoReflect

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

func (*OpenTunnelReply) Reset

func (x *OpenTunnelReply) Reset()

func (*OpenTunnelReply) String

func (x *OpenTunnelReply) String() string

type OpenTunnelRequest

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

OpenTunnel asks the plugin to establish a tunnel to the given peer and return a local endpoint for it.

peer is opaque to the client: its semantics are defined by the plugin itself (rendezvous capability ID, WG public key, custom credential...). The client only passes it through.

func (*OpenTunnelRequest) Descriptor deprecated

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

Deprecated: Use OpenTunnelRequest.ProtoReflect.Descriptor instead.

func (*OpenTunnelRequest) GetPeer

func (x *OpenTunnelRequest) GetPeer() string

func (*OpenTunnelRequest) ProtoMessage

func (*OpenTunnelRequest) ProtoMessage()

func (*OpenTunnelRequest) ProtoReflect

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

func (*OpenTunnelRequest) Reset

func (x *OpenTunnelRequest) Reset()

func (*OpenTunnelRequest) String

func (x *OpenTunnelRequest) String() string

type P2PClient

type P2PClient interface {
	OpenTunnel(ctx context.Context, in *OpenTunnelRequest, opts ...grpc.CallOption) (*OpenTunnelReply, error)
	CloseTunnel(ctx context.Context, in *CloseTunnelRequest, opts ...grpc.CallOption) (*CloseTunnelReply, error)
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error)
}

P2PClient is the client API for P2P 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 NewP2PClient

func NewP2PClient(cc grpc.ClientConnInterface) P2PClient

type P2PServer

type P2PServer interface {
	OpenTunnel(context.Context, *OpenTunnelRequest) (*OpenTunnelReply, error)
	CloseTunnel(context.Context, *CloseTunnelRequest) (*CloseTunnelReply, error)
	Status(context.Context, *StatusRequest) (*StatusReply, error)
	// contains filtered or unexported methods
}

P2PServer is the server API for P2P service. All implementations must embed UnimplementedP2PServer for forward compatibility

type StatusReply

type StatusReply struct {
	Tunnels int32 `protobuf:"varint,1,opt,name=tunnels,proto3" json:"tunnels,omitempty"` // future path/status fields are added here
	// contains filtered or unexported fields
}

func (*StatusReply) Descriptor deprecated

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

Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.

func (*StatusReply) GetTunnels

func (x *StatusReply) GetTunnels() int32

func (*StatusReply) ProtoMessage

func (*StatusReply) ProtoMessage()

func (*StatusReply) ProtoReflect

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

func (*StatusReply) Reset

func (x *StatusReply) Reset()

func (*StatusReply) String

func (x *StatusReply) String() string

type StatusRequest

type StatusRequest struct {
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type UnimplementedP2PServer

type UnimplementedP2PServer struct {
}

UnimplementedP2PServer must be embedded to have forward compatible implementations.

func (UnimplementedP2PServer) CloseTunnel

func (UnimplementedP2PServer) OpenTunnel

func (UnimplementedP2PServer) Status

type UnsafeP2PServer

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

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

Jump to

Keyboard shortcuts

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