Documentation ¶
Index ¶
Constants ¶
View Source
const ( VersionV1 = "v1" PathV1 = prefix + VersionV1 )
Variables ¶
This section is empty.
Functions ¶
func InitMetric ¶
func InitMetric() error
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)
Types ¶
type Action ¶
type Action httpserver.Action
type MetricAPIResource ¶
type MetricAPIResource struct { Conf *config.Config Rd *rdiscover.RDiscover ActionsV1 []*httpserver.Action }
func GetAPIResource ¶
func GetAPIResource() *MetricAPIResource
func (*MetricAPIResource) InitActions ¶
func (a *MetricAPIResource) InitActions()
Click to show internal directories.
Click to hide internal directories.