server

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RpcErrorCode_TaskIdIsNotSet = 1
	RpcErrorCode_AnswerIsNotSet = 2
	RpcErrorCode_CheckError     = 3
	RpcErrorCode_CreateError    = 4
)

Codes.

View Source
const (
	RpcErrorMsg_TaskIdIsNotSet = "task ID is not set"
	RpcErrorMsg_AnswerIsNotSet = "answer is not set"
	RpcErrorMsgF_CheckError    = "check error: %s"
	RpcErrorMsgF_CreateError   = "captcha creation error: %s"
)

Messages.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

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

func (*Server) CheckCaptcha

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

func (*Server) CreateCaptcha

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

func (*Server) GetCaptchaManagerListenDsn

func (srv *Server) GetCaptchaManagerListenDsn() (dsn string)

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

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

Jump to

Keyboard shortcuts

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