eventhandler

package
v1.24.7 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListAllTenantNamespaces added in v1.24.7

func ListAllTenantNamespaces(ctx context.Context, db *database.Database, tenantname, clustername string) ([]string, error)

Types

type EventHandler

type EventHandler struct {
	*lokilog.LogHandler
}

func (*EventHandler) Event

func (l *EventHandler) Event(c *gin.Context)

QueryRange 获取事件

@Tags			Event
@Summary		获取事件
@Description	获取事件
@Accept			json
@Produce		json
@Param			cluster	path		string									true	"cluster_name"
@Param			query	query		string									true	"query"
@Param			condition	query		string									false	"condition"
@Param			tenant 	query		string									false	"tenant"
@Param			limit	query		int										false	"limit"
@Param			start	query		string									false	"start"
@Param			end		query		string									false	"end"
@Success		200		{object}	handlers.ResponseStruct{Data=string}	"QueryRange"
@Router			/v1/event/{cluster} [get]
@Security		JWT

func (*EventHandler) GetEvent added in v1.24.7

func (l *EventHandler) GetEvent(c *gin.Context, options GetEventOptions) (*loki.QueryResponseData, error)

func (*EventHandler) RegistRouter

func (h *EventHandler) RegistRouter(rg *gin.RouterGroup)

type GetEventOptions added in v1.24.7

type GetEventOptions struct {
	Tenant     string   `json:"tenant"`
	Condition  string   `json:"condition"`
	Cluster    string   `json:"cluster"`
	Namespaces []string `json:"namespaces"`
	Start      string   `json:"start,omitempty"`
	End        string   `json:"end,omitempty"`
	Limit      int      `json:"limit,omitempty"`
}

Jump to

Keyboard shortcuts

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