Documentation ¶
Index ¶
- Variables
- type RunOption
- type RunOptions
- type Server
- func (server *Server) ClientAdd(addr string)
- func (server *Server) Run00(ctx context.Context, options ...RunOption) error
- func (server *Server) Run01(ctx context.Context, options ...RunOption) error
- func (server *Server) RunGinRoute(ctx context.Context, r *gin.Engine, prefix string, options ...RunOption) error
Constants ¶
This section is empty.
Variables ¶
View Source
var WebCtx = ""
Functions ¶
This section is empty.
Types ¶
type RunOption ¶
type RunOption func(*RunOptions)
RunOption is an option of Server.Run().
func WithGracefullContext ¶
WithGracefullContext accepts a context to shutdown a Server with care for existing client connections.
type RunOptions ¶
type RunOptions struct {
// contains filtered or unexported fields
}
RunOptions holds a set of configurations for Server.Run().
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a webtty HTTP endpoint.
func New ¶
New creates a new instance of Server. Server will use the New() of the factory provided to handle each request.
func (*Server) Run00 ¶ added in v0.2.2
Run starts the main process of the Server. The cancelation of ctx will shutdown the server immediately with aborting existing connections. Use WithGracefulContext() to support graceful shutdown.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.