api

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_forwarder_proto protoreflect.FileDescriptor

Functions

func RegisterForwarderServer

func RegisterForwarderServer(s *grpc.Server, srv ForwarderServer)

Types

type CloseRequest

type CloseRequest struct {
	NetId    string `protobuf:"bytes,1,opt,name=netId,proto3" json:"netId,omitempty"`
	Proto    string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	BindAddr string `protobuf:"bytes,3,opt,name=bindAddr,proto3" json:"bindAddr,omitempty"`
	BindPort uint32 `protobuf:"varint,4,opt,name=bindPort,proto3" json:"bindPort,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseRequest) Descriptor deprecated

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

Deprecated: Use CloseRequest.ProtoReflect.Descriptor instead.

func (*CloseRequest) GetBindAddr

func (x *CloseRequest) GetBindAddr() string

func (*CloseRequest) GetBindPort

func (x *CloseRequest) GetBindPort() uint32

func (*CloseRequest) GetNetId

func (x *CloseRequest) GetNetId() string

func (*CloseRequest) GetProto

func (x *CloseRequest) GetProto() string

func (*CloseRequest) ProtoMessage

func (*CloseRequest) ProtoMessage()

func (*CloseRequest) ProtoReflect

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

func (*CloseRequest) Reset

func (x *CloseRequest) Reset()

func (*CloseRequest) String

func (x *CloseRequest) String() string

type CloseResponse

type CloseResponse struct {
	NetId    string `protobuf:"bytes,1,opt,name=netId,proto3" json:"netId,omitempty"`
	Proto    string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	BindAddr string `protobuf:"bytes,3,opt,name=bindAddr,proto3" json:"bindAddr,omitempty"`
	BindPort uint32 `protobuf:"varint,4,opt,name=bindPort,proto3" json:"bindPort,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseResponse) Descriptor deprecated

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

Deprecated: Use CloseResponse.ProtoReflect.Descriptor instead.

func (*CloseResponse) GetBindAddr

func (x *CloseResponse) GetBindAddr() string

func (*CloseResponse) GetBindPort

func (x *CloseResponse) GetBindPort() uint32

func (*CloseResponse) GetNetId

func (x *CloseResponse) GetNetId() string

func (*CloseResponse) GetProto

func (x *CloseResponse) GetProto() string

func (*CloseResponse) ProtoMessage

func (*CloseResponse) ProtoMessage()

func (*CloseResponse) ProtoReflect

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

func (*CloseResponse) Reset

func (x *CloseResponse) Reset()

func (*CloseResponse) String

func (x *CloseResponse) String() string

type ForwarderClient

type ForwarderClient interface {
	Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error)
	Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error)
	ListByRemote(ctx context.Context, in *ListByRemoteRequest, opts ...grpc.CallOption) (*ListByRemoteResponse, error)
}

ForwarderClient is the client API for Forwarder 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 NewForwarderClient

func NewForwarderClient(cc grpc.ClientConnInterface) ForwarderClient

type ForwarderServer

type ForwarderServer interface {
	Open(context.Context, *OpenRequest) (*OpenResponse, error)
	Close(context.Context, *CloseRequest) (*CloseResponse, error)
	ListByRemote(context.Context, *ListByRemoteRequest) (*ListByRemoteResponse, error)
	// contains filtered or unexported methods
}

ForwarderServer is the server API for Forwarder service. All implementations must embed UnimplementedForwarderServer for forward compatibility

type ListByRemoteRequest

type ListByRemoteRequest struct {
	NetId      string `protobuf:"bytes,1,opt,name=netId,proto3" json:"netId,omitempty"`
	Proto      string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	RemoteAddr string `protobuf:"bytes,3,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
	RemotePort uint32 `protobuf:"varint,4,opt,name=remotePort,proto3" json:"remotePort,omitempty"`
	// contains filtered or unexported fields
}

func (*ListByRemoteRequest) Descriptor deprecated

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

Deprecated: Use ListByRemoteRequest.ProtoReflect.Descriptor instead.

func (*ListByRemoteRequest) GetNetId

func (x *ListByRemoteRequest) GetNetId() string

func (*ListByRemoteRequest) GetProto

func (x *ListByRemoteRequest) GetProto() string

func (*ListByRemoteRequest) GetRemoteAddr

func (x *ListByRemoteRequest) GetRemoteAddr() string

func (*ListByRemoteRequest) GetRemotePort

func (x *ListByRemoteRequest) GetRemotePort() uint32

func (*ListByRemoteRequest) ProtoMessage

func (*ListByRemoteRequest) ProtoMessage()

func (*ListByRemoteRequest) ProtoReflect

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

func (*ListByRemoteRequest) Reset

func (x *ListByRemoteRequest) Reset()

func (*ListByRemoteRequest) String

func (x *ListByRemoteRequest) String() string

type ListByRemoteResponse

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

func (*ListByRemoteResponse) Descriptor deprecated

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

Deprecated: Use ListByRemoteResponse.ProtoReflect.Descriptor instead.

func (*ListByRemoteResponse) GetForwards

func (x *ListByRemoteResponse) GetForwards() []*OpenResponse

func (*ListByRemoteResponse) ProtoMessage

func (*ListByRemoteResponse) ProtoMessage()

func (*ListByRemoteResponse) ProtoReflect

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

func (*ListByRemoteResponse) Reset

func (x *ListByRemoteResponse) Reset()

func (*ListByRemoteResponse) String

func (x *ListByRemoteResponse) String() string

type OpenRequest

type OpenRequest struct {
	NetId      string `protobuf:"bytes,1,opt,name=netId,proto3" json:"netId,omitempty"`
	Proto      string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	BindAddr   string `protobuf:"bytes,3,opt,name=bindAddr,proto3" json:"bindAddr,omitempty"`
	BindPort   uint32 `protobuf:"varint,4,opt,name=bindPort,proto3" json:"bindPort,omitempty"`
	RemoteAddr string `protobuf:"bytes,5,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
	RemotePort uint32 `protobuf:"varint,6,opt,name=remotePort,proto3" json:"remotePort,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenRequest) Descriptor deprecated

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

Deprecated: Use OpenRequest.ProtoReflect.Descriptor instead.

func (*OpenRequest) GetBindAddr

func (x *OpenRequest) GetBindAddr() string

func (*OpenRequest) GetBindPort

func (x *OpenRequest) GetBindPort() uint32

func (*OpenRequest) GetNetId

func (x *OpenRequest) GetNetId() string

func (*OpenRequest) GetProto

func (x *OpenRequest) GetProto() string

func (*OpenRequest) GetRemoteAddr

func (x *OpenRequest) GetRemoteAddr() string

func (*OpenRequest) GetRemotePort

func (x *OpenRequest) GetRemotePort() uint32

func (*OpenRequest) ProtoMessage

func (*OpenRequest) ProtoMessage()

func (*OpenRequest) ProtoReflect

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

func (*OpenRequest) Reset

func (x *OpenRequest) Reset()

func (*OpenRequest) String

func (x *OpenRequest) String() string

type OpenResponse

type OpenResponse struct {
	NetId      string `protobuf:"bytes,1,opt,name=netId,proto3" json:"netId,omitempty"`
	Proto      string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
	BindAddr   string `protobuf:"bytes,3,opt,name=bindAddr,proto3" json:"bindAddr,omitempty"`
	BindPort   uint32 `protobuf:"varint,4,opt,name=bindPort,proto3" json:"bindPort,omitempty"`
	RemoteAddr string `protobuf:"bytes,5,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
	RemotePort uint32 `protobuf:"varint,6,opt,name=remotePort,proto3" json:"remotePort,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenResponse) Descriptor deprecated

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

Deprecated: Use OpenResponse.ProtoReflect.Descriptor instead.

func (*OpenResponse) GetBindAddr

func (x *OpenResponse) GetBindAddr() string

func (*OpenResponse) GetBindPort

func (x *OpenResponse) GetBindPort() uint32

func (*OpenResponse) GetNetId

func (x *OpenResponse) GetNetId() string

func (*OpenResponse) GetProto

func (x *OpenResponse) GetProto() string

func (*OpenResponse) GetRemoteAddr

func (x *OpenResponse) GetRemoteAddr() string

func (*OpenResponse) GetRemotePort

func (x *OpenResponse) GetRemotePort() uint32

func (*OpenResponse) ProtoMessage

func (*OpenResponse) ProtoMessage()

func (*OpenResponse) ProtoReflect

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

func (*OpenResponse) Reset

func (x *OpenResponse) Reset()

func (*OpenResponse) String

func (x *OpenResponse) String() string

type UnimplementedForwarderServer

type UnimplementedForwarderServer struct {
}

UnimplementedForwarderServer must be embedded to have forward compatible implementations.

func (*UnimplementedForwarderServer) Close

func (*UnimplementedForwarderServer) ListByRemote

func (*UnimplementedForwarderServer) Open

Jump to

Keyboard shortcuts

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