Documentation ¶
Index ¶
Constants ¶
View Source
const MaxInt = int(MaxUint >> 1)
View Source
const MaxUint = ^uint(0)
View Source
const MinInt = -MaxInt - 1
View Source
const MinUint = 0
Variables ¶
This section is empty.
Functions ¶
func NopReadSeekCloser ¶
func NopReadSeekCloser(rs io.ReadSeeker) nopReadSeekCloser
Types ¶
type ClientConfig ¶
type ClientConfig struct {
// contains filtered or unexported fields
}
func NewClientConfig ¶
func NewClientConfig(serverAddr string, roundTripper http.RoundTripper, options ...ClientConfigOption) *ClientConfig
type ClientConfigOption ¶
type ClientConfigOption interface {
ApplyToClientConfig(*ClientConfig)
}
func WithDialerCtor ¶
func WithDialerCtor(dialerCtor func() *websocket.Dialer) ClientConfigOption
type ClientConfigOptionFunc ¶
type ClientConfigOptionFunc func(cfg *ClientConfig)
func (ClientConfigOptionFunc) ApplyToClientConfig ¶
func (opt ClientConfigOptionFunc) ApplyToClientConfig(c *ClientConfig)
type ConcurrencyCounter ¶
type ConcurrencyCounter struct {
// contains filtered or unexported fields
}
func NewCounter ¶
func NewCounter() *ConcurrencyCounter
func (*ConcurrencyCounter) Count ¶
func (c *ConcurrencyCounter) Count() int
func (*ConcurrencyCounter) Dec ¶
func (c *ConcurrencyCounter) Dec()
func (*ConcurrencyCounter) Inc ¶
func (c *ConcurrencyCounter) Inc()
func (*ConcurrencyCounter) Init ¶
func (c *ConcurrencyCounter) Init(val int)
func (*ConcurrencyCounter) Max ¶
func (c *ConcurrencyCounter) Max() int
func (*ConcurrencyCounter) Min ¶
func (c *ConcurrencyCounter) Min() int
func (*ConcurrencyCounter) Set ¶
func (c *ConcurrencyCounter) Set(val int)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements a tunnel server using WebSockets
func NewServer ¶
func NewServer(options ...ServerOption) *Server
NewServer returns a new Server instance
type ServerOption ¶
type ServerOption interface {
ApplyToServer(*Server)
}
func WithUpgrader ¶
func WithUpgrader(upgrader websocket.Upgrader) ServerOption
type ServerOptionFunc ¶
type ServerOptionFunc func(*Server)
func (ServerOptionFunc) ApplyToServer ¶
func (opt ServerOptionFunc) ApplyToServer(s *Server)
type WithLogger ¶
func (WithLogger) ApplyToClientConfig ¶
func (opt WithLogger) ApplyToClientConfig(c *ClientConfig)
func (WithLogger) ApplyToServer ¶
func (opt WithLogger) ApplyToServer(s *Server)
Click to show internal directories.
Click to hide internal directories.