Renaming to server.
This commit is contained in:
parent
119c9937d7
commit
320afc53d2
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//ConnectionStatsAPI --
|
//ConnectionStatsAPI --
|
||||||
type ConnectionStatsAPI struct {
|
type ConnectionStatsAPI struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//DomainsAPI -- A collections of all the domains
|
//DomainsAPI -- A collections of all the domains
|
||||||
//List of Domains -> DomainAPI
|
//List of Domains -> DomainAPI
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//ServerDomainsAPI -- Structure to support the server API
|
//ServerDomainsAPI -- Structure to support the server API
|
||||||
type ServerDomainsAPI struct {
|
type ServerDomainsAPI struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//StatusDeadTimeAPI -- structure for deadtime configuration
|
//StatusDeadTimeAPI -- structure for deadtime configuration
|
||||||
type StatusDeadTimeAPI struct {
|
type StatusDeadTimeAPI struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//TrafficStats --
|
//TrafficStats --
|
||||||
type TrafficAPI struct {
|
type TrafficAPI struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//DomainMapping --
|
//DomainMapping --
|
||||||
type DomainMapping struct {
|
type DomainMapping struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//DomainTrack -- Tracking specifics for domains
|
//DomainTrack -- Tracking specifics for domains
|
||||||
type DomainTrack struct {
|
type DomainTrack struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -43,8 +43,8 @@ func NewListenerRegistration(port int) (p *ListenerRegistration) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//GenericListeners -
|
//servers -
|
||||||
type GenericListeners struct {
|
type servers struct {
|
||||||
listeners map[*net.Listener]int
|
listeners map[*net.Listener]int
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
connnectionTable *Table
|
connnectionTable *Table
|
||||||
|
@ -52,7 +52,7 @@ type GenericListeners struct {
|
||||||
secretKey string
|
secretKey string
|
||||||
certbundle tls.Certificate
|
certbundle tls.Certificate
|
||||||
register chan *ListenerRegistration
|
register chan *ListenerRegistration
|
||||||
genericListeners *GenericListeners
|
servers *servers
|
||||||
wssHostName string
|
wssHostName string
|
||||||
adminHostName string
|
adminHostName string
|
||||||
cancelCheck int
|
cancelCheck int
|
||||||
|
@ -61,8 +61,8 @@ type GenericListeners struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
//NewGenerListeners --
|
//NewGenerListeners --
|
||||||
func NewGenerListeners(ctx context.Context, secretKey string, certbundle tls.Certificate, serverStatus *Status) (p *GenericListeners) {
|
func NewGenerListeners(ctx context.Context, secretKey string, certbundle tls.Certificate, serverStatus *Status) (p *servers) {
|
||||||
p = new(GenericListeners)
|
p = new(servers)
|
||||||
p.listeners = make(map[*net.Listener]int)
|
p.listeners = make(map[*net.Listener]int)
|
||||||
p.ctx = ctx
|
p.ctx = ctx
|
||||||
p.connnectionTable = serverStatus.ConnectionTable
|
p.connnectionTable = serverStatus.ConnectionTable
|
||||||
|
@ -81,7 +81,7 @@ func NewGenerListeners(ctx context.Context, secretKey string, certbundle tls.Cer
|
||||||
//Run -- Execute
|
//Run -- Execute
|
||||||
// - execute the GenericLister
|
// - execute the GenericLister
|
||||||
// - pass initial port, we'll announce that
|
// - pass initial port, we'll announce that
|
||||||
func (gl *GenericListeners) Run(ctx context.Context, initialPort int) {
|
func (gl *servers) Run(ctx context.Context, initialPort int) {
|
||||||
loginfo.Println("ConnectionTable starting")
|
loginfo.Println("ConnectionTable starting")
|
||||||
|
|
||||||
config := &tls.Config{Certificates: []tls.Certificate{gl.certbundle}}
|
config := &tls.Config{Certificates: []tls.Certificate{gl.certbundle}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//SendTrack -- Used as a channel communication to id domain asssociated to domain for outbound WSS
|
//SendTrack -- Used as a channel communication to id domain asssociated to domain for outbound WSS
|
||||||
type SendTrack struct {
|
type SendTrack struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
@ -15,8 +15,8 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
loginfo = log.New(os.Stdout, "INFO: genericlistener: ", logFlags)
|
loginfo = log.New(os.Stdout, "INFO: server: ", logFlags)
|
||||||
logdebug = log.New(os.Stdout, "DEBUG: genericlistener:", logFlags)
|
logdebug = log.New(os.Stdout, "DEBUG: server:", logFlags)
|
||||||
connectionID = 0
|
connectionID = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -15,7 +15,7 @@ type Status struct {
|
||||||
DeadTime *StatusDeadTime
|
DeadTime *StatusDeadTime
|
||||||
ConnectionTracking *Tracking
|
ConnectionTracking *Tracking
|
||||||
ConnectionTable *Table
|
ConnectionTable *Table
|
||||||
GenericListeners *GenericListeners
|
servers *servers
|
||||||
LoadbalanceDefaultMethod string
|
LoadbalanceDefaultMethod string
|
||||||
AdminStats *TrafficStats
|
AdminStats *TrafficStats
|
||||||
AdminReqTyoe *AdminReqType
|
AdminReqTyoe *AdminReqType
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//StatusDeadTime -- structure for deadtime configuration
|
//StatusDeadTime -- structure for deadtime configuration
|
||||||
type StatusDeadTime struct {
|
type StatusDeadTime struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import "sync"
|
import "sync"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//ConnectionStats --
|
//ConnectionStats --
|
||||||
type ConnectionStats struct {
|
type ConnectionStats struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
//TrafficStats --
|
//TrafficStats --
|
||||||
type TrafficStats struct {
|
type TrafficStats struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package genericlistener
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
Loading…
Reference in New Issue