Documentation
¶
Index ¶
- type Client
- func (c *Client) AttachSession(ctx context.Context, sessionID string) (pb.Egg_SessionClient, error)
- func (c *Client) Close() error
- func (c *Client) Kill(ctx context.Context, sessionID string) error
- func (c *Client) List(ctx context.Context) (*pb.ListResponse, error)
- func (c *Client) Resize(ctx context.Context, sessionID string, rows, cols uint32) error
- func (c *Client) Spawn(ctx context.Context, req *pb.SpawnRequest) (*pb.SpawnResponse, error)
- func (c *Client) Version(ctx context.Context) (string, error)
- type Server
- func (s *Server) Kill(ctx context.Context, req *pb.KillRequest) (*pb.KillResponse, error)
- func (s *Server) List(ctx context.Context, req *pb.ListRequest) (*pb.ListResponse, error)
- func (s *Server) Resize(ctx context.Context, req *pb.ResizeRequest) (*pb.ResizeResponse, error)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) Session(stream pb.Egg_SessionServer) error
- func (s *Server) Spawn(ctx context.Context, req *pb.SpawnRequest) (*pb.SpawnResponse, error)
- func (s *Server) Version(ctx context.Context, req *pb.VersionRequest) (*pb.VersionResponse, error)
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the generated gRPC client for the egg.
func (*Client) AttachSession ¶
AttachSession opens a bidirectional stream for PTY I/O.
func (*Client) Spawn ¶
func (c *Client) Spawn(ctx context.Context, req *pb.SpawnRequest) (*pb.SpawnResponse, error)
Spawn creates a new PTY session in the egg.
type Server ¶
type Server struct {
pb.UnimplementedEggServer
// contains filtered or unexported fields
}
Server implements the Egg gRPC service — holds PTY fds across wing restarts.
func NewServer ¶
NewServer creates a new egg server. The dir should be ~/.wingthing. The version string is recorded so wings can detect version mismatches.
func (*Server) Kill ¶
func (s *Server) Kill(ctx context.Context, req *pb.KillRequest) (*pb.KillResponse, error)
Kill terminates a session.
func (*Server) List ¶
func (s *Server) List(ctx context.Context, req *pb.ListRequest) (*pb.ListResponse, error)
List returns all active sessions.
func (*Server) Resize ¶
func (s *Server) Resize(ctx context.Context, req *pb.ResizeRequest) (*pb.ResizeResponse, error)
Resize changes the terminal dimensions of a session.
func (*Server) Session ¶
func (s *Server) Session(stream pb.Egg_SessionServer) error
Session implements the bidirectional PTY I/O stream.
func (*Server) Spawn ¶
func (s *Server) Spawn(ctx context.Context, req *pb.SpawnRequest) (*pb.SpawnResponse, error)
Spawn creates a new PTY session.
func (*Server) Version ¶
func (s *Server) Version(ctx context.Context, req *pb.VersionRequest) (*pb.VersionResponse, error)
Version returns the egg's binary version.
Click to show internal directories.
Click to hide internal directories.