Documentation ¶
Index ¶
- Constants
- func GetMapOfHttpStatusCodesByRpcErrorCodes() map[int]int
- type Server
- func (srv *Server) AddSubscription(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ClearThreadSubscriptionsS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) DeleteSubscription(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) DeleteSubscriptionS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetDKey(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListenDsn() (dsn string)
- func (srv *Server) GetMustStopAB() *atomic.Bool
- func (srv *Server) GetStopChannel() *chan bool
- func (srv *Server) GetSubRoutinesWG() *sync.WaitGroup
- func (srv *Server) GetThreadSubscribersS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetUserSubscriptions(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ReportStart()
- func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) Start() (err error)
- func (srv *Server) Stop() (err error)
- func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) UseConstructor(stn cm.ISettings) (cm.IServer, error)
Constants ¶
View Source
const ( RpcErrorCode_UserIdIsNotSet = 1 RpcErrorCode_ThreadIdIsNotSet = 2 RpcErrorCode_SubscriptionIsNotFound = 3 RpcErrorCode_ThreadExists = 4 RpcErrorCode_ThreadDoesNotExist = 5 RpcErrorCode_TestError = 6 )
Codes.
View Source
const ( RpcErrorMsg_UserIdIsNotSet = "user ID is not set" RpcErrorMsg_ThreadIdIsNotSet = "thread ID is not set" RpcErrorMsg_SubscriptionIsNotFound = "subscription is not found" RpcErrorMsg_ThreadExists = "thread exists" RpcErrorMsg_ThreadDoesNotExist = "thread does not exist" RpcErrorMsgF_TestError = "test error: %s" )
Messages.
Variables ¶
This section is empty.
Functions ¶
func GetMapOfHttpStatusCodesByRpcErrorCodes ¶
Unique HTTP status codes used in the map: - 400 (Bad request); - 404 (Not found); - 409 (Conflict); - 500 (Internal server error).
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddSubscription ¶
func (srv *Server) AddSubscription(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ClearThreadSubscriptionsS ¶
func (srv *Server) ClearThreadSubscriptionsS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) DeleteSubscription ¶
func (srv *Server) DeleteSubscription(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) DeleteSubscriptionS ¶
func (srv *Server) DeleteSubscriptionS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetDKey ¶
func (srv *Server) GetDKey(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListenDsn ¶
func (*Server) GetMustStopAB ¶
func (*Server) GetStopChannel ¶
func (*Server) GetSubRoutinesWG ¶
func (*Server) GetThreadSubscribersS ¶
func (srv *Server) GetThreadSubscribersS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetUserSubscriptions ¶
func (srv *Server) GetUserSubscriptions(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) Ping ¶
func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ReportStart ¶
func (srv *Server) ReportStart()
func (*Server) ShowDiagnosticData ¶
func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) Test ¶
func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
Click to show internal directories.
Click to hide internal directories.