v1

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	P2P_CreateListen_FullMethodName  = "/api.network.v1.P2p/CreateListen"
	P2P_CreateForward_FullMethodName = "/api.network.v1.P2p/CreateForward"
	P2P_CloseListen_FullMethodName   = "/api.network.v1.P2p/CloseListen"
	P2P_ListListen_FullMethodName    = "/api.network.v1.P2p/ListListen"
)
View Source
const OperationP2PCloseListen = "/api.network.v1.P2p/CloseListen"
View Source
const OperationP2PCreateForward = "/api.network.v1.P2p/CreateForward"
View Source
const OperationP2PCreateListen = "/api.network.v1.P2p/CreateListen"
View Source
const OperationP2PListListen = "/api.network.v1.P2p/ListListen"

Variables

View Source
var File_network_v1_p2p_proto protoreflect.FileDescriptor
View Source
var P2P_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.network.v1.P2p",
	HandlerType: (*P2PServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateListen",
			Handler:    _P2P_CreateListen_Handler,
		},
		{
			MethodName: "CreateForward",
			Handler:    _P2P_CreateForward_Handler,
		},
		{
			MethodName: "CloseListen",
			Handler:    _P2P_CloseListen_Handler,
		},
		{
			MethodName: "ListListen",
			Handler:    _P2P_ListListen_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "network/v1/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 RegisterP2PHTTPServer

func RegisterP2PHTTPServer(s *http.Server, srv P2PHTTPServer)

func RegisterP2PServer

func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer)

Types

type CloseListenReply

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

func (*CloseListenReply) Descriptor deprecated

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

Deprecated: Use CloseListenReply.ProtoReflect.Descriptor instead.

func (*CloseListenReply) ProtoMessage

func (*CloseListenReply) ProtoMessage()

func (*CloseListenReply) ProtoReflect

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

func (*CloseListenReply) Reset

func (x *CloseListenReply) Reset()

func (*CloseListenReply) String

func (x *CloseListenReply) String() string

type CloseListenRequest

type CloseListenRequest struct {
	Protocol      *string `protobuf:"bytes,1,opt,name=protocol,proto3,oneof" json:"protocol,omitempty"`
	ListenAddress *string `protobuf:"bytes,2,opt,name=listen_address,json=listenAddress,proto3,oneof" json:"listen_address,omitempty"`
	TargetAddress *string `protobuf:"bytes,3,opt,name=target_address,json=targetAddress,proto3,oneof" json:"target_address,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseListenRequest) Descriptor deprecated

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

Deprecated: Use CloseListenRequest.ProtoReflect.Descriptor instead.

func (*CloseListenRequest) GetListenAddress

func (x *CloseListenRequest) GetListenAddress() string

func (*CloseListenRequest) GetProtocol

func (x *CloseListenRequest) GetProtocol() string

func (*CloseListenRequest) GetTargetAddress

func (x *CloseListenRequest) GetTargetAddress() string

func (*CloseListenRequest) ProtoMessage

func (*CloseListenRequest) ProtoMessage()

func (*CloseListenRequest) ProtoReflect

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

func (*CloseListenRequest) Reset

func (x *CloseListenRequest) Reset()

func (*CloseListenRequest) String

func (x *CloseListenRequest) String() string

type CreateForwardReply

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

func (*CreateForwardReply) Descriptor deprecated

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

Deprecated: Use CreateForwardReply.ProtoReflect.Descriptor instead.

func (*CreateForwardReply) ProtoMessage

func (*CreateForwardReply) ProtoMessage()

func (*CreateForwardReply) ProtoReflect

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

func (*CreateForwardReply) Reset

func (x *CreateForwardReply) Reset()

func (*CreateForwardReply) String

func (x *CreateForwardReply) String() string

type CreateForwardRequest

type CreateForwardRequest struct {
	Portal        string `protobuf:"bytes,1,opt,name=portal,proto3" json:"portal,omitempty"`
	ListenAddress string `protobuf:"bytes,2,opt,name=listen_address,json=listenAddress,proto3" json:"listen_address,omitempty"`
	TargetAddress string `protobuf:"bytes,3,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateForwardRequest) Descriptor deprecated

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

Deprecated: Use CreateForwardRequest.ProtoReflect.Descriptor instead.

func (*CreateForwardRequest) GetListenAddress

func (x *CreateForwardRequest) GetListenAddress() string

func (*CreateForwardRequest) GetPortal

func (x *CreateForwardRequest) GetPortal() string

func (*CreateForwardRequest) GetTargetAddress

func (x *CreateForwardRequest) GetTargetAddress() string

func (*CreateForwardRequest) ProtoMessage

func (*CreateForwardRequest) ProtoMessage()

func (*CreateForwardRequest) ProtoReflect

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

func (*CreateForwardRequest) Reset

func (x *CreateForwardRequest) Reset()

func (*CreateForwardRequest) String

func (x *CreateForwardRequest) String() string

type CreateListenReply

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

func (*CreateListenReply) Descriptor deprecated

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

Deprecated: Use CreateListenReply.ProtoReflect.Descriptor instead.

func (*CreateListenReply) ProtoMessage

func (*CreateListenReply) ProtoMessage()

func (*CreateListenReply) ProtoReflect

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

func (*CreateListenReply) Reset

func (x *CreateListenReply) Reset()

func (*CreateListenReply) String

func (x *CreateListenReply) String() string

type CreateListenRequest

type CreateListenRequest struct {
	Protocol      string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
	TargetAddress string `protobuf:"bytes,2,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateListenRequest) Descriptor deprecated

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

Deprecated: Use CreateListenRequest.ProtoReflect.Descriptor instead.

func (*CreateListenRequest) GetProtocol

func (x *CreateListenRequest) GetProtocol() string

func (*CreateListenRequest) GetTargetAddress

func (x *CreateListenRequest) GetTargetAddress() string

func (*CreateListenRequest) ProtoMessage

func (*CreateListenRequest) ProtoMessage()

func (*CreateListenRequest) ProtoReflect

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

func (*CreateListenRequest) Reset

func (x *CreateListenRequest) Reset()

func (*CreateListenRequest) String

func (x *CreateListenRequest) String() string

type ListListenReply

type ListListenReply struct {
	Result []*ListenReply `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*ListListenReply) Descriptor deprecated

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

Deprecated: Use ListListenReply.ProtoReflect.Descriptor instead.

func (*ListListenReply) GetResult

func (x *ListListenReply) GetResult() []*ListenReply

func (*ListListenReply) ProtoMessage

func (*ListListenReply) ProtoMessage()

func (*ListListenReply) ProtoReflect

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

func (*ListListenReply) Reset

func (x *ListListenReply) Reset()

func (*ListListenReply) String

func (x *ListListenReply) String() string

type ListListenRequest

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

func (*ListListenRequest) Descriptor deprecated

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

Deprecated: Use ListListenRequest.ProtoReflect.Descriptor instead.

func (*ListListenRequest) ProtoMessage

func (*ListListenRequest) ProtoMessage()

func (*ListListenRequest) ProtoReflect

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

func (*ListListenRequest) Reset

func (x *ListListenRequest) Reset()

func (*ListListenRequest) String

func (x *ListListenRequest) String() string

type ListenReply

type ListenReply struct {
	Protocol      string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
	ListenAddress string `protobuf:"bytes,2,opt,name=listen_address,json=listenAddress,proto3" json:"listen_address,omitempty"`
	TargetAddress string `protobuf:"bytes,3,opt,name=target_address,json=targetAddress,proto3" json:"target_address,omitempty"`
	// contains filtered or unexported fields
}

func (*ListenReply) Descriptor deprecated

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

Deprecated: Use ListenReply.ProtoReflect.Descriptor instead.

func (*ListenReply) GetListenAddress

func (x *ListenReply) GetListenAddress() string

func (*ListenReply) GetProtocol

func (x *ListenReply) GetProtocol() string

func (*ListenReply) GetTargetAddress

func (x *ListenReply) GetTargetAddress() string

func (*ListenReply) ProtoMessage

func (*ListenReply) ProtoMessage()

func (*ListenReply) ProtoReflect

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

func (*ListenReply) Reset

func (x *ListenReply) Reset()

func (*ListenReply) String

func (x *ListenReply) String() string

type P2PClient

type P2PClient interface {
	CreateListen(ctx context.Context, in *CreateListenRequest, opts ...grpc.CallOption) (*CreateListenReply, error)
	CreateForward(ctx context.Context, in *CreateForwardRequest, opts ...grpc.CallOption) (*CreateForwardReply, error)
	CloseListen(ctx context.Context, in *CloseListenRequest, opts ...grpc.CallOption) (*CloseListenReply, error)
	ListListen(ctx context.Context, in *ListListenRequest, opts ...grpc.CallOption) (*ListListenReply, 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 P2PHTTPClient

type P2PHTTPClient interface {
	CloseListen(ctx context.Context, req *CloseListenRequest, opts ...http.CallOption) (rsp *CloseListenReply, err error)
	CreateForward(ctx context.Context, req *CreateForwardRequest, opts ...http.CallOption) (rsp *CreateForwardReply, err error)
	CreateListen(ctx context.Context, req *CreateListenRequest, opts ...http.CallOption) (rsp *CreateListenReply, err error)
	ListListen(ctx context.Context, req *ListListenRequest, opts ...http.CallOption) (rsp *ListListenReply, err error)
}

func NewP2PHTTPClient

func NewP2PHTTPClient(client *http.Client) P2PHTTPClient

type P2PHTTPClientImpl

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

func (*P2PHTTPClientImpl) CloseListen

func (*P2PHTTPClientImpl) CreateForward

func (*P2PHTTPClientImpl) CreateListen

func (*P2PHTTPClientImpl) ListListen

type P2PServer

type P2PServer interface {
	CreateListen(context.Context, *CreateListenRequest) (*CreateListenReply, error)
	CreateForward(context.Context, *CreateForwardRequest) (*CreateForwardReply, error)
	CloseListen(context.Context, *CloseListenRequest) (*CloseListenReply, error)
	ListListen(context.Context, *ListListenRequest) (*ListListenReply, error)
	// contains filtered or unexported methods
}

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

type UnimplementedP2PServer

type UnimplementedP2PServer struct {
}

UnimplementedP2PServer must be embedded to have forward compatible implementations.

func (UnimplementedP2PServer) CloseListen

func (UnimplementedP2PServer) CreateForward

func (UnimplementedP2PServer) CreateListen

func (UnimplementedP2PServer) ListListen

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