Documentation ¶
Index ¶
- Constants
- type GateClient
- func (g *GateClient) AddMobile(ctx context.Context) (list *MobileList, err error)
- func (g *GateClient) Broadcast(message []byte)
- func (g *GateClient) Close()
- func (g *GateClient) DeleteMobile(token string, ctx context.Context) (list *MobileList, err error)
- func (g *GateClient) GetMobileList(ctx context.Context) (list *MobileList, err error)
- func (g *GateClient) GetSettings() (Settings, error)
- func (g *GateClient) RegisterServer()
- func (g *GateClient) RequestFromMobileProxy(message stream.Message)
- func (g *GateClient) Restart()
- func (g *GateClient) Send(command string, payload map[string]interface{}, ctx context.Context, ...) (err error)
- func (g *GateClient) SetEngine(engine *gin.Engine)
- func (g *GateClient) Shutdown()
- func (g *GateClient) Status() string
- func (g *GateClient) Subscribe(command string, f func(client stream.IStreamClient, msg stream.Message))
- func (g *GateClient) UnSubscribe(command string)
- func (g *GateClient) UpdateSettings(settings Settings) (err error)
- type IWsCallback
- type MobileList
- type Settings
- type StreamRequestModel
- type StreamResponseModel
- type WsClient
Constants ¶
View Source
const ( Request = "request" Response = "response" StatusSuccess = "success" StatusError = "error" )
View Source
const ( GateStatusWait = "wait" GateStatusConnected = "connected" GateStatusNotConnected = "not connected" GateStatusQuit = "quit" )
View Source
const (
ClientTypeServer = "server"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GateClient ¶
func NewGateClient ¶
func NewGateClient(adaptors *adaptors.Adaptors, graceful *graceful_service.GracefulService, metric *metrics.MetricManager) (gate *GateClient)
func (*GateClient) AddMobile ¶
func (g *GateClient) AddMobile(ctx context.Context) (list *MobileList, err error)
func (*GateClient) Broadcast ¶ added in v0.0.15
func (g *GateClient) Broadcast(message []byte)
func (*GateClient) Close ¶
func (g *GateClient) Close()
func (*GateClient) DeleteMobile ¶
func (g *GateClient) DeleteMobile(token string, ctx context.Context) (list *MobileList, err error)
func (*GateClient) GetMobileList ¶
func (g *GateClient) GetMobileList(ctx context.Context) (list *MobileList, err error)
func (*GateClient) GetSettings ¶
func (g *GateClient) GetSettings() (Settings, error)
func (*GateClient) RegisterServer ¶ added in v0.0.13
func (g *GateClient) RegisterServer()
func (*GateClient) RequestFromMobileProxy ¶ added in v0.0.11
func (g *GateClient) RequestFromMobileProxy(message stream.Message)
func (*GateClient) Restart ¶ added in v0.0.13
func (g *GateClient) Restart()
func (*GateClient) SetEngine ¶ added in v0.0.11
func (g *GateClient) SetEngine(engine *gin.Engine)
func (*GateClient) Shutdown ¶
func (g *GateClient) Shutdown()
func (*GateClient) Status ¶
func (g *GateClient) Status() string
func (*GateClient) Subscribe ¶
func (g *GateClient) Subscribe(command string, f func(client stream.IStreamClient, msg stream.Message))
func (*GateClient) UnSubscribe ¶
func (g *GateClient) UnSubscribe(command string)
func (*GateClient) UpdateSettings ¶
func (g *GateClient) UpdateSettings(settings Settings) (err error)
type IWsCallback ¶
type IWsCallback interface {
// contains filtered or unexported methods
}
type MobileList ¶
type Settings ¶
type StreamRequestModel ¶ added in v0.0.11
type StreamResponseModel ¶ added in v0.0.11
type WsClient ¶
type WsClient struct {
// contains filtered or unexported fields
}
func NewWsClient ¶
func NewWsClient(cb IWsCallback, metric *metrics.MetricManager) *WsClient
func (*WsClient) UpdateSettings ¶ added in v0.0.23
Click to show internal directories.
Click to hide internal directories.