Documentation ¶
Index ¶
- Constants
- func EnsureCollectionExists(logger *zap.Logger, db driver.Database)
- func ExtractDataFromExtData(req *pb.ServicesProvidersExtentionData) (hostname string, fingerprint string, err error)
- func MakeFingerprint(c []byte) string
- type DBServerAPI
- func (s *DBServerAPI) GetType(ctx context.Context, req *pb.GetTypeRequest) (*pb.GetTypeResponse, error)
- func (s *DBServerAPI) Register(ctx context.Context, in *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
- func (s *DBServerAPI) Test(ctx context.Context, req *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
- func (s *DBServerAPI) Unregister(ctx context.Context, in *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
- func (s *DBServerAPI) Update(ctx context.Context, in *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
- type HostsFingerprintsPair
- type TunnelServer
- func (s *TunnelServer) InitConnection(stream pb.SocketConnectionService_InitConnectionServer) error
- func (s *TunnelServer) LoadHostFingerprintsFromDB()
- func (s *TunnelServer) Log(stream pb.SocketConnectionService_LogAdminServer) error
- func (s *TunnelServer) LogConnection(stream pb.SocketConnectionService_LogConnectionServer) error
- func (s *TunnelServer) StartDBgRPCServer() *grpc.Server
- func (s *TunnelServer) StartHttpServer() *http.Server
- func (s *TunnelServer) WaitForConnection(host string) error
Constants ¶
View Source
const HOSTS_COLLECTION = "TunnelHosts"
Variables ¶
This section is empty.
Functions ¶
func ExtractDataFromExtData ¶
func ExtractDataFromExtData(req *pb.ServicesProvidersExtentionData) (hostname string, fingerprint string, err error)
Types ¶
type DBServerAPI ¶
type DBServerAPI struct { pb.UnimplementedServicesProvidersExtentionsServiceServer *TunnelServer }
func (*DBServerAPI) GetType ¶
func (s *DBServerAPI) GetType(ctx context.Context, req *pb.GetTypeRequest) (*pb.GetTypeResponse, error)
func (*DBServerAPI) Register ¶
func (s *DBServerAPI) Register(ctx context.Context, in *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
Add host/Fingerprint to DB
func (*DBServerAPI) Test ¶
func (s *DBServerAPI) Test(ctx context.Context, req *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
func (*DBServerAPI) Unregister ¶
func (s *DBServerAPI) Unregister(ctx context.Context, in *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
Delete host/Fingerprint to DB
func (*DBServerAPI) Update ¶
func (s *DBServerAPI) Update(ctx context.Context, in *pb.ServicesProvidersExtentionData) (*pb.GenericResponse, error)
Edit host/Fingerprint to DB
type HostsFingerprintsPair ¶
type TunnelServer ¶
type TunnelServer struct { pb.UnimplementedSocketConnectionServiceServer // contains filtered or unexported fields }
struct for GRPC interface SocketConnectionServer and exchange data between methods
func NewTunnelServer ¶
func NewTunnelServer(log *zap.Logger, db driver.Database) *TunnelServer
Initialize new struct for GRPC interface
func (*TunnelServer) InitConnection ¶
func (s *TunnelServer) InitConnection(stream pb.SocketConnectionService_InitConnectionServer) error
Initiate soket connection from Location
func (*TunnelServer) LoadHostFingerprintsFromDB ¶
func (s *TunnelServer) LoadHostFingerprintsFromDB()
Gets fingerprint-host chain from DB
func (*TunnelServer) Log ¶
func (s *TunnelServer) Log(stream pb.SocketConnectionService_LogAdminServer) error
Getting container logs
func (*TunnelServer) LogConnection ¶
func (s *TunnelServer) LogConnection(stream pb.SocketConnectionService_LogConnectionServer) error
Getting container logs
func (*TunnelServer) StartDBgRPCServer ¶
func (s *TunnelServer) StartDBgRPCServer() *grpc.Server
Start grpc server to update fingerprint-host database
func (*TunnelServer) StartHttpServer ¶
func (s *TunnelServer) StartHttpServer() *http.Server
Start http server to pass request to grpc, then next Location
func (*TunnelServer) WaitForConnection ¶
func (s *TunnelServer) WaitForConnection(host string) error
Click to show internal directories.
Click to hide internal directories.