Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewConfig, NewOptions, NewBoreServer, )
ProviderSet exports for wire DI.
Functions ¶
Types ¶
type BoreServer ¶
BoreServer defines main struct for bore server and includes HTTP and SSH server instances.
func NewBoreServer ¶
func NewBoreServer(opts *Options, logger *zap.Logger) *BoreServer
NewBoreServer returns new instance of BoreServer.
type DashboardMessage ¶ added in v0.5.0
type DashboardMessage struct {
Type string `json:"type"`
Tunnels []TunnelMetrics `json:"tunnels"`
ServerStats ServerStats `json:"serverStats"`
}
type HTTPServer ¶
HTTPServer extends net/http Server with graceful shutdowns.
func NewHTTPServer ¶
func NewHTTPServer(logger *zap.SugaredLogger) *HTTPServer
NewHTTPServer creates a new HTTPServer instance.
type MetricsHub ¶ added in v0.5.0
type MetricsHub struct {
// contains filtered or unexported fields
}
func NewMetricsHub ¶ added in v0.5.0
func NewMetricsHub(sshServer *SSHServer, logger *zap.SugaredLogger) *MetricsHub
func (*MetricsHub) Close ¶ added in v0.5.0
func (h *MetricsHub) Close()
func (*MetricsHub) HandleWebSocket ¶ added in v0.5.0
func (h *MetricsHub) HandleWebSocket(w http.ResponseWriter, r *http.Request)
func (*MetricsHub) RecordTraffic ¶ added in v0.5.0
func (h *MetricsHub) RecordTraffic(tunnelID string, bytesIn, bytesOut uint64)
type Options ¶
type Options struct {
Domain string
PrivateKey string
PublicKey string
SSHAddr string
HTTPAddr string
Logger *logger.Options
}
Options are global config for bore server.
type SSHServer ¶
type SSHServer struct {
// contains filtered or unexported fields
}
SSHServer defines SSH server instance.
func NewSSHServer ¶
func NewSSHServer(opts *Options, logger *zap.SugaredLogger) *SSHServer
NewSSHServer returns new instance of SSHServer.
type ServerStats ¶ added in v0.5.0
type ServerStats struct {
TotalBytesIn uint64 `json:"totalBytesIn"`
TotalBytesOut uint64 `json:"totalBytesOut"`
CumulativeBytesIn uint64 `json:"cumulativeBytesIn"`
CumulativeBytesOut uint64 `json:"cumulativeBytesOut"`
ThroughputIn float64 `json:"throughputIn"`
ThroughputOut float64 `json:"throughputOut"`
}
type TunnelMetrics ¶ added in v0.5.0
type TunnelMetrics struct {
ID string `json:"id"`
Domain string `json:"domain"`
Port uint32 `json:"port"`
Addr string `json:"addr"`
BytesIn uint64 `json:"bytesIn"`
BytesOut uint64 `json:"bytesOut"`
CumulativeBytesIn uint64 `json:"cumulativeBytesIn"`
CumulativeBytesOut uint64 `json:"cumulativeBytesOut"`
ThroughputIn float64 `json:"throughputIn"`
ThroughputOut float64 `json:"throughputOut"`
ConnectedAt time.Time `json:"connectedAt"`
LastActivity time.Time `json:"lastActivity"`
ActiveConnections int `json:"activeConnections"`
}
Click to show internal directories.
Click to hide internal directories.