Documentation ¶
Index ¶
- func RegisterServer(gs *grpc.Server, s *Server)
- type ForwardClient
- type Server
- func (s *Server) Close() error
- func (s *Server) CreateService(r *pb.CreateServiceRequest, css pb.ControlService_CreateServiceServer) error
- func (s *Server) ForwardToService(ctx context.Context, r *pb.ForwardToServiceRequest) (*pb.ForwardToServiceResponse, error)
- func (s *Server) ListServices(ctx context.Context, _ *pb.ListServicesRequest) (*pb.ListServicesResponse, error)
- func (s *Server) ProxyListen(l net.Listener) error
- type ServiceClient
- type TokenSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterServer ¶
Types ¶
type ForwardClient ¶
type ForwardClient struct {
// contains filtered or unexported fields
}
ForwardClient sets up a local TCP listener which takes incoming connections and forwards them to the service.
func NewForwardClient ¶
func NewForwardClient(cc *grpc.ClientConn, service, localAddr string) *ForwardClient
NewForwardClient creates a new forward for service, that will forward connections from localAddr.
func (*ForwardClient) Close ¶
func (fc *ForwardClient) Close() error
Close shuts down all running connections.
func (*ForwardClient) Forward ¶
func (fc *ForwardClient) Forward() error
Forward sets up a local listener and forward the connections to the service.
type Server ¶
type Server struct { pb.UnimplementedControlServiceServer // contains filtered or unexported fields }
Server.
func (*Server) CreateService ¶
func (s *Server) CreateService(r *pb.CreateServiceRequest, css pb.ControlService_CreateServiceServer) error
Create a service.
func (*Server) ForwardToService ¶
func (s *Server) ForwardToService(ctx context.Context, r *pb.ForwardToServiceRequest) (*pb.ForwardToServiceResponse, error)
Forward to remote service.
func (*Server) ListServices ¶
func (s *Server) ListServices(ctx context.Context, _ *pb.ListServicesRequest) (*pb.ListServicesResponse, error)
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
ServiceClient registers services and constructs connections to pass traffic through when forwards arrive for them.
func NewServiceClient ¶
func NewServiceClient(cc *grpc.ClientConn, name, target string) *ServiceClient
NewServiceClient creates a new ServiceClient.
func (*ServiceClient) Close ¶
func (sc *ServiceClient) Close() error
Close shuts down all running connections.
type TokenSource ¶
type TokenSource struct {
// contains filtered or unexported fields
}
TokenSource is a simple token generator.
Click to show internal directories.
Click to hide internal directories.