Documentation ¶
Index ¶
Constants ¶
View Source
const ( VersionV1 = "v1" PathV1 = prefix + VersionV1 )
Variables ¶
This section is empty.
Functions ¶
func InitActionsFunc ¶
func InitActionsFunc() error
InitActionsFunc init all actions registered in initFunc
func RegisterInitFunc ¶
func RegisterInitFunc(f func() error)
called by actions for registering some daemon functions and these functions will be called after flag-init and server-start
func RegisterV1Action ¶
func RegisterV1Action(action Action)
Register a handler into v1 actions means all the URL of these handlers are start with PathV1
func ReturnRest ¶
func ReturnRest(resp *RestResponse)
ReturnRest receive the response param and make up the http return body
Types ¶
type DistCCControllerAPIResource ¶
type DistCCControllerAPIResource struct { ActionsV1 []*httpserver.Action Rd rd.RegisterDiscover Ops store.Ops Conf *config.DistCCControllerConfig }
DistCCControllerAPIResource describe the distcc controller api resource
func GetAPIResource ¶
func GetAPIResource() *DistCCControllerAPIResource
GetAPIResource return the singleton api resource
func (*DistCCControllerAPIResource) InitActions ¶
func (a *DistCCControllerAPIResource) InitActions()
InitActions init the http actions
type RestResponse ¶
type RestResponse struct { Resp *restful.Response HTTPCode int Data interface{} ErrCode commonTypes.ServerErrCode Message string Extra map[string]interface{} WrapFunc func([]byte) []byte }
RestResponse describe the response param for http handlers
Click to show internal directories.
Click to hide internal directories.