Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cfg *config.Config Version string )
View Source
var RootCmd = &cobra.Command{
Use: "elchi-client",
Short: "Elchi Client - A gRPC client that communicates with a remote server",
Long: `Elchi Client, a gRPC client that securely communicates with a remote server and processes commands.`,
}
View Source
var StartCmd = &cobra.Command{ Use: "start", Short: "Start the client", Long: `Start the client and connect to the remote server.`, RunE: func(cmd *cobra.Command, args []string) error { logger := logger.NewLogger("main") return NewSessionManager(logger).Run() }, }
Functions ¶
Types ¶
type ClientSession ¶
ClientSession represents a client session with the server
func (*ClientSession) Connect ¶
func (s *ClientSession) Connect(ctx context.Context) error
Connect establishes a connection to the server
func (*ClientSession) Shutdown ¶
func (s *ClientSession) Shutdown(ctx context.Context)
Shutdown performs a graceful shutdown of the session
func (*ClientSession) StreamCommands ¶
func (s *ClientSession) StreamCommands(ctx context.Context, errChan chan<- error)
StreamCommands handles the command stream from the server
func (*ClientSession) TriggerReconnect ¶
func (s *ClientSession) TriggerReconnect()
TriggerReconnect marks the session as disconnected to trigger re-registration
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager handles the lifecycle of a client session
func NewSessionManager ¶
func NewSessionManager(log *logger.Logger) *SessionManager
NewSessionManager creates a new session manager
Click to show internal directories.
Click to hide internal directories.