Documentation ¶
Overview ¶
Package router Events-API
Events-API is service for storing Kubernetes and Containerum events in MongoDB.
Version: 0.0.1 Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- type EventAggregator
- type EventBatcher
- type EventsHandlers
- func (h *EventsHandlers) AddSystemEventHandler(ctx *gin.Context)
- func (h *EventsHandlers) AddUserEventHandler(ctx *gin.Context)
- func (h *EventsHandlers) AllNamespaceResourcesChangesEventsHandler(ctx *gin.Context)
- func (h *EventsHandlers) AllResourcesChangesEventsHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNodesEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetSystemEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetUsersEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) SelectedNamespaceResourcesChangesEventsHandler(ctx *gin.Context)
- func (h *EventsHandlers) SelectedResourcesChangesEventsHandler(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventAggregator ¶ added in v0.0.15
type EventAggregator struct { CTX context.Context Params model.FuncParams EventSource model.EventsFunc EventDrain chan<- kubeModel.Event ErrChan chan<- error Control *gocontrol.Guard DBPeriod time.Duration FirstTimeWaitGroup *sync.WaitGroup }
func (EventAggregator) Run ¶ added in v0.0.15
func (aggregate EventAggregator) Run()
type EventBatcher ¶ added in v0.0.13
type EventBatcher struct { Ctx context.Context ErrChan chan error Quant time.Duration EventSource <-chan kubeModel.Event BatchDrain chan<- []kubeModel.Event Control *gocontrol.Guard PreallocBatchSize int FirstTimeWaitGroup *sync.WaitGroup }
func (EventBatcher) Run ¶ added in v0.0.13
func (batcher EventBatcher) Run()
type EventsHandlers ¶
type EventsHandlers struct { server.EventsActions *m.TranslateValidate DBPeriod time.Duration }
func (*EventsHandlers) AddSystemEventHandler ¶ added in v0.0.4
func (h *EventsHandlers) AddSystemEventHandler(ctx *gin.Context)
swagger:operation POST /events/containerum/system Events AddSystemEvent Add system event.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: body in: body schema: $ref: '#/definitions/Event'
responses:
'202': description: event added default: $ref: '#/responses/error'
func (*EventsHandlers) AddUserEventHandler ¶ added in v0.0.4
func (h *EventsHandlers) AddUserEventHandler(ctx *gin.Context)
swagger:operation POST /events/containerum/users Events AddUserEvent Add user event.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: body in: body schema: $ref: '#/definitions/Event'
responses:
'202': description: event added default: $ref: '#/responses/error'
func (*EventsHandlers) AllNamespaceResourcesChangesEventsHandler ¶ added in v0.0.15
func (h *EventsHandlers) AllNamespaceResourcesChangesEventsHandler(ctx *gin.Context)
swagger:operation GET /namespaces/{namespace}/all AllEvents AllNamespaceResourcesChangesEvents Get all events in namespace.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: time in: query type: string required: false
responses:
'101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) AllResourcesChangesEventsHandler ¶ added in v0.0.13
func (h *EventsHandlers) AllResourcesChangesEventsHandler(ctx *gin.Context)
swagger:operation GET /all AllEvents AllResourcesChangesEvents Get all events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: time in: query type: string required: false
responses:
'101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNodesEventsListHandler ¶ added in v0.0.21
func (h *EventsHandlers) GetNodesEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/nodes Events GetNodesEventsLis Get nodes events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: time in: query type: string required: false
responses:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetSystemEventsListHandler ¶ added in v0.0.4
func (h *EventsHandlers) GetSystemEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/containerum/system Events GetSystemEventsList Get system events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: time in: query type: string required: false
responses:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetUsersEventsListHandler ¶ added in v0.0.4
func (h *EventsHandlers) GetUsersEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/containerum/users Events GetUsersEventsList Get users events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: time in: query type: string required: false
responses:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) SelectedNamespaceResourcesChangesEventsHandler ¶ added in v0.0.15
func (h *EventsHandlers) SelectedNamespaceResourcesChangesEventsHandler(ctx *gin.Context)
swagger:operation GET /namespaces/{namespace}/selected AllEvents SelectedNamespaceResourcesChangesEvents Get selected events in namespace.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: res in: query type: string required: false
- name: time in: query type: string required: false
responses:
'101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) SelectedResourcesChangesEventsHandler ¶ added in v0.0.14
func (h *EventsHandlers) SelectedResourcesChangesEventsHandler(ctx *gin.Context)
swagger:operation GET /selected AllEvents SelectedResourcesChangesEvents Get selected events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: ws in: query type: string required: false
- name: limit in: query type: string required: false
- name: res in: query type: string required: false
- name: time in: query type: string required: false
responses:
'101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'