示例#1
0
文件: api.go 项目: eswdd/bosun
// GetMetadata uses the path provided to request
func (c *Client) GetMetadata(p string) (string, error) {
	op := &request.Operation{
		Name:       "GetMetadata",
		HTTPMethod: "GET",
		HTTPPath:   path.Join("/", "meta-data", p),
	}

	output := &metadataOutput{}
	req := request.New(c.Service.ServiceInfo, c.Service.Handlers, c.Service.Retryer, op, nil, output)

	return output.Content, req.Send()
}
示例#2
0
文件: service.go 项目: eswdd/bosun
// NewRequest returns a new Request pointer for the service API
// operation and parameters.
func (s *Service) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request {
	return request.New(s.ServiceInfo, s.Handlers, s.Retryer, operation, params, data)
}