33 lines
764 B
Go
33 lines
764 B
Go
package subscribe
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"git.loafle.net/commons_go/logging"
|
|
cwf "git.loafle.net/commons_go/websocket_fasthttp"
|
|
"git.loafle.net/overflow/overflow_gateway_websocket/servlet"
|
|
oos "git.loafle.net/overflow/overflow_subscriber"
|
|
)
|
|
|
|
type SubscriberHandlers struct {
|
|
oos.SubscriberHandlers
|
|
|
|
ServletHandler servlet.ServletHandler
|
|
}
|
|
|
|
func (sh *SubscriberHandlers) GetSocket(id string) cwf.Socket {
|
|
return sh.ServletHandler.GetSocket(id)
|
|
}
|
|
|
|
func (sh *SubscriberHandlers) GetSockets() map[string]cwf.Socket {
|
|
return sh.ServletHandler.GetSockets()
|
|
}
|
|
|
|
func (sh *SubscriberHandlers) Validate() {
|
|
sh.SubscriberHandlers.Validate()
|
|
|
|
if nil == sh.ServletHandler {
|
|
logging.Logger().Panic(fmt.Sprintf("Gateway Websocket: servletHandler must be specified"))
|
|
}
|
|
}
|