Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterP2PHTTPServer(s *http.Server, srv P2PHTTPServer)
- func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer)
- type CloseListenReply
- type CloseListenRequest
- func (*CloseListenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CloseListenRequest) GetListenAddress() string
- func (x *CloseListenRequest) GetProtocol() string
- func (x *CloseListenRequest) GetTargetAddress() string
- func (*CloseListenRequest) ProtoMessage()
- func (x *CloseListenRequest) ProtoReflect() protoreflect.Message
- func (x *CloseListenRequest) Reset()
- func (x *CloseListenRequest) String() string
- type CreateForwardReply
- type CreateForwardRequest
- func (*CreateForwardRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateForwardRequest) GetListenAddress() string
- func (x *CreateForwardRequest) GetPortal() string
- func (x *CreateForwardRequest) GetTargetAddress() string
- func (*CreateForwardRequest) ProtoMessage()
- func (x *CreateForwardRequest) ProtoReflect() protoreflect.Message
- func (x *CreateForwardRequest) Reset()
- func (x *CreateForwardRequest) String() string
- type CreateListenReply
- type CreateListenRequest
- func (*CreateListenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateListenRequest) GetProtocol() string
- func (x *CreateListenRequest) GetTargetAddress() string
- func (*CreateListenRequest) ProtoMessage()
- func (x *CreateListenRequest) ProtoReflect() protoreflect.Message
- func (x *CreateListenRequest) Reset()
- func (x *CreateListenRequest) String() string
- type ListListenReply
- type ListListenRequest
- type ListenReply
- func (*ListenReply) Descriptor() ([]byte, []int)deprecated
- func (x *ListenReply) GetListenAddress() string
- func (x *ListenReply) GetProtocol() string
- func (x *ListenReply) GetTargetAddress() string
- func (*ListenReply) ProtoMessage()
- func (x *ListenReply) ProtoReflect() protoreflect.Message
- func (x *ListenReply) Reset()
- func (x *ListenReply) String() string
- type P2PClient
- type P2PHTTPClient
- type P2PHTTPClientImpl
- func (c *P2PHTTPClientImpl) CloseListen(ctx context.Context, in *CloseListenRequest, opts ...http.CallOption) (*CloseListenReply, error)
- func (c *P2PHTTPClientImpl) CreateForward(ctx context.Context, in *CreateForwardRequest, opts ...http.CallOption) (*CreateForwardReply, error)
- func (c *P2PHTTPClientImpl) CreateListen(ctx context.Context, in *CreateListenRequest, opts ...http.CallOption) (*CreateListenReply, error)
- func (c *P2PHTTPClientImpl) ListListen(ctx context.Context, in *ListListenRequest, opts ...http.CallOption) (*ListListenReply, error)
- type P2PHTTPServer
- type P2PServer
- type UnimplementedP2PServer
- func (UnimplementedP2PServer) CloseListen(context.Context, *CloseListenRequest) (*CloseListenReply, error)
- func (UnimplementedP2PServer) CreateForward(context.Context, *CreateForwardRequest) (*CreateForwardReply, error)
- func (UnimplementedP2PServer) CreateListen(context.Context, *CreateListenRequest) (*CreateListenReply, error)
- func (UnimplementedP2PServer) ListListen(context.Context, *ListListenRequest) (*ListListenReply, error)
- type UnsafeP2PServer
Constants ¶
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" )
const OperationP2PCloseListen = "/api.network.v1.P2p/CloseListen"
const OperationP2PCreateForward = "/api.network.v1.P2p/CreateForward"
const OperationP2PCreateListen = "/api.network.v1.P2p/CreateListen"
const OperationP2PListListen = "/api.network.v1.P2p/ListListen"
Variables ¶
var File_network_v1_p2p_proto protoreflect.FileDescriptor
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 (c *P2PHTTPClientImpl) CloseListen(ctx context.Context, in *CloseListenRequest, opts ...http.CallOption) (*CloseListenReply, error)
func (*P2PHTTPClientImpl) CreateForward ¶
func (c *P2PHTTPClientImpl) CreateForward(ctx context.Context, in *CreateForwardRequest, opts ...http.CallOption) (*CreateForwardReply, error)
func (*P2PHTTPClientImpl) CreateListen ¶
func (c *P2PHTTPClientImpl) CreateListen(ctx context.Context, in *CreateListenRequest, opts ...http.CallOption) (*CreateListenReply, error)
func (*P2PHTTPClientImpl) ListListen ¶
func (c *P2PHTTPClientImpl) ListListen(ctx context.Context, in *ListListenRequest, opts ...http.CallOption) (*ListListenReply, error)
type P2PHTTPServer ¶
type P2PHTTPServer interface { CloseListen(context.Context, *CloseListenRequest) (*CloseListenReply, error) CreateForward(context.Context, *CreateForwardRequest) (*CreateForwardReply, error) CreateListen(context.Context, *CreateListenRequest) (*CreateListenReply, error) ListListen(context.Context, *ListListenRequest) (*ListListenReply, error) }
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) CloseListen(context.Context, *CloseListenRequest) (*CloseListenReply, error)
func (UnimplementedP2PServer) CreateForward ¶
func (UnimplementedP2PServer) CreateForward(context.Context, *CreateForwardRequest) (*CreateForwardReply, error)
func (UnimplementedP2PServer) CreateListen ¶
func (UnimplementedP2PServer) CreateListen(context.Context, *CreateListenRequest) (*CreateListenReply, error)
func (UnimplementedP2PServer) ListListen ¶
func (UnimplementedP2PServer) ListListen(context.Context, *ListListenRequest) (*ListListenReply, error)
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.