route

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

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

func WithGracefullContext(ctx context.Context) RunOption

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

func New(containerCli container.Cli, options config.ServerConfig) (*Server, error)

New creates a new instance of Server. Server will use the New() of the factory provided to handle each request.

func (*Server) ClientAdd added in v0.2.5

func (server *Server) ClientAdd(addr string)

func (*Server) Run00 added in v0.2.2

func (server *Server) Run00(ctx context.Context, options ...RunOption) error

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.

func (*Server) Run01 added in v0.2.2

func (server *Server) Run01(ctx context.Context, options ...RunOption) error

func (*Server) RunGinRoute added in v0.2.2

func (server *Server) RunGinRoute(ctx context.Context, r *gin.Engine, prefix string, options ...RunOption) error

Directories

Path Synopsis
Code generated for package asset by go-bindata DO NOT EDIT.
Code generated for package asset by go-bindata DO NOT EDIT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL