Documentation ¶
Index ¶
- func Cancel(ctl monitor.BatchController) func(http.ResponseWriter, *http.Request)
- func Create(ctl monitor.BatchController) func(http.ResponseWriter, *http.Request)
- func List(ctl monitor.BatchController) func(http.ResponseWriter, *http.Request)
- type Batch
- type Event
- type Resource
- type ResourceRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cancel ¶
func Cancel(ctl monitor.BatchController) func(http.ResponseWriter, *http.Request)
func Create ¶
func Create(ctl monitor.BatchController) func(http.ResponseWriter, *http.Request)
Create is a wrapper around the HTTP handler for the POST /batch route. It takes a kafka producer as argument in order to trigger batch events.
func List ¶
func List(ctl monitor.BatchController) func(http.ResponseWriter, *http.Request)
Types ¶
type Batch ¶
type Batch struct { ID string `json:"id"` Timestamp string `json:"timestamp,omitempty"` Resources []Resource `json:"resources,omitempty"` }
Batch describes a batch in request response payload
type Resource ¶
type Resource struct { ID string `json:"resource_id"` ResourceType string `json:"resource_type,omitempty"` }
Resource descibes a resource of a batch
type ResourceRequest ¶
type ResourceRequest struct {
Resources []Resource `json:"resources"`
}
ResourceRequest describes a list of resources of a batch
Click to show internal directories.
Click to hide internal directories.