Documentation
¶
Index ¶
- Variables
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) IsTty() bool
- func (c *Connection) Stderr() io.Writer
- func (c *Connection) Stdin() io.Reader
- func (c *Connection) Stdout() io.Writer
- func (c *Connection) WindowReceiver() <-chan *values.Window
- func (c *Connection) WindowSender() chan<- *values.Window
- type ConnectionLimiter
- type User
- type Workspace
- type WorkspaceConnection
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTooManyConnections = errors.New("too many connections")
)
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(isTty bool, io *values.ConnectionIO) *Connection
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) IsTty ¶
func (c *Connection) IsTty() bool
func (*Connection) Stderr ¶
func (c *Connection) Stderr() io.Writer
func (*Connection) Stdin ¶
func (c *Connection) Stdin() io.Reader
func (*Connection) Stdout ¶
func (c *Connection) Stdout() io.Writer
func (*Connection) WindowReceiver ¶
func (c *Connection) WindowReceiver() <-chan *values.Window
func (*Connection) WindowSender ¶
func (c *Connection) WindowSender() chan<- *values.Window
type ConnectionLimiter ¶ added in v0.5.24
type ConnectionLimiter struct {
// contains filtered or unexported fields
}
ConnectionLimiter manages global connection limits
func NewConnectionLimiter ¶ added in v0.5.24
func NewConnectionLimiter(maxConnections int64) *ConnectionLimiter
NewConnectionLimiter creates a new connection limiter with the specified maximum
func (*ConnectionLimiter) Release ¶ added in v0.5.24
func (cl *ConnectionLimiter) Release()
Release releases a connection slot
func (*ConnectionLimiter) TryAcquire ¶ added in v0.5.24
func (cl *ConnectionLimiter) TryAcquire() error
TryAcquire attempts to acquire a connection slot Returns an error if the limit has been reached
type User ¶
type User struct {
values.HashedPassword
// contains filtered or unexported fields
}
type Workspace ¶
type Workspace struct {
Status values.WorkspaceStatus
// contains filtered or unexported fields
}
func NewWorkspace ¶
func NewWorkspace(id values.WorkspaceID, name values.WorkspaceName, userName values.UserName, maxConnections int64) *Workspace
func (*Workspace) AddConnection ¶
func (*Workspace) ConnectionNum ¶
func (*Workspace) ID ¶
func (w *Workspace) ID() values.WorkspaceID
func (*Workspace) Name ¶
func (w *Workspace) Name() values.WorkspaceName
func (*Workspace) RemoveConnection ¶
type WorkspaceConnection ¶
type WorkspaceConnection struct {
// contains filtered or unexported fields
}
func NewWorkspaceConnection ¶
func NewWorkspaceConnection(id values.WorkspaceConnectionID, io *values.WorkspaceIO) *WorkspaceConnection
func (*WorkspaceConnection) ID ¶
func (wc *WorkspaceConnection) ID() values.WorkspaceConnectionID
func (*WorkspaceConnection) ReadCloser ¶
func (wc *WorkspaceConnection) ReadCloser() io.ReadCloser
func (*WorkspaceConnection) WriteCloser ¶
func (wc *WorkspaceConnection) WriteCloser() io.WriteCloser
Source Files
¶
Click to show internal directories.
Click to hide internal directories.