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 ¶
- func AbortWaiter(aborted func() bool) <-chan struct{}
- 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) GetConfigMapChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetDeploymentChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetIngressChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespaceChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespaceConfigMapsChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespaceDeploymentsChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespaceIngressesChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespacePVCsChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespacePVCsEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespacePodsEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespaceSecretsChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNamespaceServicesChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetNodesEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetPVCChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetPVCEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetPodEventsListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetSecretChangesListHandler(ctx *gin.Context)
- func (h *EventsHandlers) GetServiceChangesListHandler(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 ¶
func AbortWaiter ¶ added in v0.0.13
func AbortWaiter(aborted func() bool) <-chan struct{}
Types ¶
type EventAggregator ¶ added in v0.0.15
type EventAggregator struct { Ctx *gin.Context StartAt time.Time Limit int EventSource eventsFunc EventDrain chan<- model.Event ErrChan chan<- error Control *gocontrol.Guard }
func (EventAggregator) Run ¶ added in v0.0.15
func (aggregate EventAggregator) Run()
type EventBatcher ¶ added in v0.0.13
type EventBatcher struct { Ctx *gin.Context ErrChan chan error Quant time.Duration EventSource <-chan model.Event BatchDrain chan<- []model.Event Control *gocontrol.Guard PreallocBatchSize int }
func (EventBatcher) Run ¶ added in v0.0.13
func (batcher EventBatcher) Run()
type EventsHandlers ¶
type EventsHandlers struct { server.EventsActions *m.TranslateValidate }
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) GetConfigMapChangesListHandler ¶ added in v0.0.8
func (h *EventsHandlers) GetConfigMapChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/configmaps/{configmap} Changes GetConfigMapChangesList Get configmap changes.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: configmap 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetDeploymentChangesListHandler ¶
func (h *EventsHandlers) GetDeploymentChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/deployments/{deployment} Changes GetDeploymentChangesList Get deployment changes.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: deployment 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetIngressChangesListHandler ¶
func (h *EventsHandlers) GetIngressChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/ingresses/{ingress} Changes GetIngressChangesList Get ingress changes.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: ingress 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespaceChangesListHandler ¶
func (h *EventsHandlers) GetNamespaceChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace} Changes GetNamespaceChangesList Get namespace changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespaceConfigMapsChangesListHandler ¶ added in v0.0.8
func (h *EventsHandlers) GetNamespaceConfigMapsChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/configmaps Changes GetNamespaceConfigMapsChangesList Get namespace configmaps changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespaceDeploymentsChangesListHandler ¶
func (h *EventsHandlers) GetNamespaceDeploymentsChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/deployments Changes GetNamespaceDeploymentsChangesList Get namespace deployments changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespaceIngressesChangesListHandler ¶
func (h *EventsHandlers) GetNamespaceIngressesChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/ingresses Changes GetNamespaceIngressesChangesList Get namespace ingresses changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespacePVCsChangesListHandler ¶
func (h *EventsHandlers) GetNamespacePVCsChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/pvc Changes GetNamespacePVCsChangesList Get namespace PVCs changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespacePVCsEventsListHandler ¶
func (h *EventsHandlers) GetNamespacePVCsEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/namespaces/{namespace}/pvc Events GetNamespacePVCsEventsList Get namespace PVCs events.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespacePodsEventsListHandler ¶
func (h *EventsHandlers) GetNamespacePodsEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/namespaces/{namespace}/pods Events GetNamespacePodsEventsList Get namespace pods events.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespaceSecretsChangesListHandler ¶ added in v0.0.8
func (h *EventsHandlers) GetNamespaceSecretsChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/secrets Changes GetNamespaceSecretsChangesList Get namespace secrets changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetNamespaceServicesChangesListHandler ¶
func (h *EventsHandlers) GetNamespaceServicesChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/services Changes GetNamespaceServicesChangesList Get namespace services changes.
--- 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '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) GetPVCChangesListHandler ¶
func (h *EventsHandlers) GetPVCChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/pvc/{pvc} Changes GetPVCChangesList Get PVC changes.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: pvc 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetPVCEventsListHandler ¶
func (h *EventsHandlers) GetPVCEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/namespaces/{namespace}/pvc/{pvc} Events GetPVCEventsList Get PVC events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: pvc 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetPodEventsListHandler ¶
func (h *EventsHandlers) GetPodEventsListHandler(ctx *gin.Context)
swagger:operation GET /events/namespaces/{namespace}/pods/{pod} Events GetPodEventsList Get pod events.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: pod 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetSecretChangesListHandler ¶ added in v0.0.8
func (h *EventsHandlers) GetSecretChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/secrets/{secret} Changes GetSecretChangesList Get secret changes.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: secret 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:
'200': description: events list schema: $ref: '#/definitions/EventsList' '101': description: websocket response schema: $ref: '#/definitions/EventsList' default: $ref: '#/responses/error'
func (*EventsHandlers) GetServiceChangesListHandler ¶
func (h *EventsHandlers) GetServiceChangesListHandler(ctx *gin.Context)
swagger:operation GET /changes/namespaces/{namespace}/services/{service} Changes GetServiceChangesList Get service changes.
--- x-method-visibility: public parameters:
- $ref: '#/parameters/UserRoleHeader'
- $ref: '#/parameters/UserIDHeader'
- name: namespace in: path type: string required: true
- name: service 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:
'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'