Help us shape the future of Go! Take the 2026 Go Developer Survey

backend

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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 EventList

type EventList struct {
	Items []Event `json:"items"`
}

type EventMetrics

type EventMetrics struct {
	Count int64 `json:"count"`
}

type EventSource

type EventSource interface {
	ListEvent(ctx context.Context, opts ListOptions) (EventList, error)
}

type EventType

type EventType string

type ListOptions

type ListOptions struct {
	Limit  int64
	Offset int64
	Filter string
}

func ListOptionsFromRequest

func ListOptionsFromRequest(req *restful.Request) (opts ListOptions, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL