# Functions
AddHttpServant add http servant handler with default exceptionStatusChecker for obj.
AddHttpServantWithExceptionStatusChecker add http servant handler with exceptionStatusChecker for obj.
AddServant add dispatch and interface for object.
AddServantWithContext add dispatch and interface for object, which have ctx,context.
AddServantWithProtocol adds a servant with protocol and obj.
CheckPanic used to dump stack info to file when catch panic.
CreatePropertyReport creats the property report instance with the key.
DefaultExceptionStatusChecker Default Exception Status Checker.
Errorf return the tars.Error instance.
No description provided by the author
GetClientConfig Get client config.
GetDayLogger Get a logger roll by day.
GetDispatchReporter returns the dispatch reporter.
GetErrorCode returns the error code.
GetHourLogger Get a logger roll by hour.
GetLogger Get a logger.
GetManager return a endpoint manager from global endpoint manager.
GetPropertyReport gets the property report instance with the key.
GetRemoteLogger returns a remote logger.
GetServerConfig Get server config.
Init need to be called first in some situation:like GetServerConfig() and GetClientConfig().
NewAdapterProxy : Construct an adapter proxy.
NewAvg new and init the average struct.
NewCommunicator returns a new communicator.
NewCount new and init the counting struct.
NewDistr new and int the Distr.
NewMax new and init the Max struct.
NewMin new and init the min struct.
NewRConf init a Rconf, path should be getting from GetServerConfig().BasePath.
NewRemoteTimeWriter new and init RemoteTimeWriter.
NewServantProxy creates and initializes a servant proxy.
NewSum new and init the sum report methods.
NewTarsProtocol return a TarsProtocol with dipatcher and implement interface.
RegisterAdmin register admin functions.
RegisterClientFilter registers the Client filter , and will be executed in every request.
RegisterDispatchReporter registers the server dispatch reporter.
RegisterPostClientFilter registers the client filter, and will be executed in order after every request.
RegisterPostServerFilter registers the server filter, executed in order after every request.
RegisterPreClientFilter registers the client filter, and will be executed in order before every request.
RegisterPreServerFilter registers the server filter, executed in order before every request.
RegisterServerFilter register the server filter.
ReportAvg avg report.
ReportCount count report.
ReportDistr distr report.
ReportMax max report.
ReportMin min report.
ReportNotifyInfo reports notify information with level and info.
ReportStatBase is base method for report statitics.
ReportStatFromClient report the statics from client.
ReportStatFromServer reports statics from server side.
ReportSum sum report.
Run the application.
UseClientFilterMiddleware uses the client filter middleware.
UserServerFilterMiddleware uses the server filter middleware.
# Constants
AcceptTimeout accept timeout,defaultvalue is 500 milliseconds.
AdapterProxyResetCount adapter proxy reset count.
AdapterProxyTicker adapter proxy ticker,defaultvalue is 10000 milliseconds.
AsyncInvokeTimeout async invoke timeout.
ClientDialTimeout connection dial timeout.
ClientIdleTimeout client idle timeout,defaultvalue is 600000 milliseconds.
ClientQueueLen client queue length.
ClientReadTimeout client read timeout,defaultvalue is 100 milliseconds.
ClientWriteTimeout client write timeout,defaultvalue is 3000 milliseconds.
HashType enum.
GracedownTimeout set timeout (milliseconds) for grace shutdown.
HandleTimeout zero millisecond for not set deadline for invoke user interface (better performance).
IdleTimeout idle timeout,defaultvalue is 600000 milliseconds.
MainLoopTicker main loop ticker,defaultvalue is 10000 milliseconds.
MaxPackageLength maximum length of the request.
HashType enum.
No description provided by the author
No description provided by the author
No description provided by the author
ObjQueueMax obj queue max number.
PropertyReportInterval property report interval,defaultvalue is 10000 milliseconds.
QueueCap queue gap.
ReadTimeout zero millisecond for not set read deadline for Conn (better performance).
2.
6.
3.
4.
5.
1.
No description provided by the author
ReqDefaultTimeout request default timeout.
No description provided by the author
No description provided by the author
StatReportChannelBufLen stat report channel len.
StatReportInterval stat report interval,defaultvalue is 10000 milliseconds.
TarsVersion is tars version.
TCPNoDelay set tcp no delay.
TCPReadBuffer tcp read buffer length.
TCPWriteBuffer tcp write buffer length.
WriteTimeout zero millisecond for not set write deadline for Conn (better performance).
ZombileTimeout zombile timeout,defaultvalue is 10000 milliseconds.
# Variables
No description provided by the author
MaxInvoke number of worker routine to handle client requestzero means no control, just one goroutine for a client request.runtime.NumCPU() usually best performance in the benchmark.
ProHelper is global PropertyReportHelper instance.
ReportStat set the default stater(default is `ReportStatFromClient`).
ServerConfigPath is the path of server config.
StatReport instance pointer of StatFHelper.
TLOG is the logger for tars framework.
# Structs
AdapterProxy : Adapter proxy.
Admin struct.
No description provided by the author
Avg for counting average for the report value.
Communicator struct.
Count is for counting the total of reporting.
Distr is used for counting the distribution of the reporting values.
Error is the type of rpc error with error code.
Max struct is for counting the Max value for the reporting value.
Message is a struct contains servant information.
Min is the struct for counting the min value.
NodeFHelper is helper struct.
NotifyHelper is the helper struct for the Notify service.
No description provided by the author
PropertyReport property report struct.
PropertyReportHelper is helper struct for property report.
RConf struct for getting remote config.
RemoteTimeWriter writer for writing remote log.
ServantProxy tars servant proxy instance.
StatFHelper is helper struct for stat reporting.
StatInfo struct contains stat info' head and body.
Sum report methods.
TarsHttpConf is configuration for tars http server.
TarsHttpMux is http.ServeMux for tars http server.
TarsProtocol is struct for dispatch with tars protocol.
TarsResponseWriter is http.ResponseWriter for tars.
# Interfaces
EndpointManager interface of naming system.
ProxyPrx interface.
ReportMethod is the interface for all kinds of report methods.
# Type aliases
ClientFilter is used for filter request & response for client, for implementing plugins like opentracing.
ClientFilterMiddleware is used for add multiple filter middleware for client, for using multiple filter such as breaker, rate limit and trace.
Dispatch server side Dispatch.
DispatchReporter is the reporter in server-side dispatch, and will be used in logging.
HashType is the hash type.
Invoke is used for Invoke tars server service.
.
ReportPolicy is report policy.
ServerFilter is used for add Filter for server dispatcher ,for implementing plugins like opentracing.
ServerFilterMiddleware is used for add multiple filter middlewares for dispatcher, for using multiple filter such as breaker, rate limit and trace.