sm

package
v0.0.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

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

func GetMapOfHttpStatusCodesByRpcErrorCodes() map[int]int

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 NewServer

func NewServer(s cm.ISettings) (srv *Server, err error)

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 (srv *Server) GetListenDsn() (dsn string)

func (*Server) GetMustStopAB

func (srv *Server) GetMustStopAB() *atomic.Bool

func (*Server) GetStopChannel

func (srv *Server) GetStopChannel() *chan bool

func (*Server) GetSubRoutinesWG

func (srv *Server) GetSubRoutinesWG() *sync.WaitGroup

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) Start

func (srv *Server) Start() (err error)

func (*Server) Stop

func (srv *Server) Stop() (err error)

func (*Server) Test

func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)

func (*Server) UseConstructor

func (srv *Server) UseConstructor(stn cm.ISettings) (cm.IServer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL