Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEventService ¶
func AddEventService(ws *restful.WebService, es EventSource)
func WebService ¶
func WebService(event EventSource) *restful.WebService
func WithListOptionsParam ¶
func WithListOptionsParam(builder *restful.RouteBuilder) *restful.RouteBuilder
Types ¶
type Event ¶
type Event struct { // Name of event, it should be shown on dashboard Name string `json:"name"` // Type of event. All events can be grouped by the type. Type EventType `json:"type"` // Metrics is the metrical data about this event Metrics EventMetrics `json:"metrics"` }
type EventMetrics ¶
type EventMetrics struct {
Count int64 `json:"count"`
}
type EventSource ¶
type EventSource interface {
ListEvent(ctx context.Context, opts ListOptions) (EventList, error)
}
type ListOptions ¶
func ListOptionsFromRequest ¶
func ListOptionsFromRequest(req *restful.Request) (opts ListOptions, err error)
Click to show internal directories.
Click to hide internal directories.