Documentation
¶
Index ¶
Constants ¶
View Source
const KBAgentDefaultConcurrency = 10
View Source
const KBAgentDefaultPort = 3501
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
Method string
Route string
// Version represents the version of the API, which is currently v1.0.
// the version is introduced to allow breaking changes.
// If the API is upgraded to v2.0, the v1.0 API will be maintained
// for compatibility until all legacy accesses are removed.
Version string
// LegacyRoute is used When the API is upgraded, some old APIs may
// need to update their path routes. To ensure compatibility,
// the old paths can be set as legacyRoute.
LegacyRoute string
Handler fasthttp.RequestHandler
}
type ErrorResponse ¶
ErrorResponse is an HTTP response message sent back to calling clients.
func NewErrorResponse ¶
func NewErrorResponse(errorCode, message string) ErrorResponse
NewErrorResponse returns a new ErrorResponse.
Click to show internal directories.
Click to hide internal directories.