datapipeline

package
v0.0.0-...-7eda018 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterDiscovery      = "ha_cluster_discovery"
	SAPsystemDiscovery    = "sap_system_discovery"
	HostDiscovery         = "host_discovery"
	SubscriptionDiscovery = "subscription_discovery"
	CloudDiscovery        = "cloud_discovery"
)

Variables

This section is empty.

Functions

func NewClustersProjector

func NewClustersProjector(db *gorm.DB) *projector

func NewHostTelemetryProjector

func NewHostTelemetryProjector(db *gorm.DB) *projector

func NewHostsProjector

func NewHostsProjector(db *gorm.DB) *projector

func NewProjector

func NewProjector(ID string, db *gorm.DB) *projector

func NewSAPSystemsProjector

func NewSAPSystemsProjector(db *gorm.DB) *projector

func NewSlesSubscriptionsProjector

func NewSlesSubscriptionsProjector(db *gorm.DB) *projector

func ProjectHealth

func ProjectHealth(db *gorm.DB, healthID, healthType, healthValue string) error

func SAPSystemsProjector_SAPSystemsDiscoveryHandler

func SAPSystemsProjector_SAPSystemsDiscoveryHandler(dataCollectedEvent *DataCollectedEvent, db *gorm.DB) error

Types

type DataCollectedEvent

type DataCollectedEvent struct {
	ID            int64
	CreatedAt     time.Time
	AgentID       string         `json:"agent_id" binding:"required"`
	DiscoveryType string         `json:"discovery_type" binding:"required"`
	Payload       datatypes.JSON `json:"payload" binding:"required"`
}

type MockProjector

type MockProjector struct {
	mock.Mock
}

MockProjector is an autogenerated mock type for the Projector type

func (*MockProjector) Project

func (_m *MockProjector) Project(dataCollectedEvent *DataCollectedEvent) error

Project provides a mock function with given fields: dataCollectedEvent

type Projector

type Projector interface {
	Project(dataCollectedEvent *DataCollectedEvent) error
}

type ProjectorHandler

type ProjectorHandler func(dataCollectedEvent *DataCollectedEvent, db *gorm.DB) error

type ProjectorRegistry

type ProjectorRegistry []Projector

func InitProjectorsRegistry

func InitProjectorsRegistry(db *gorm.DB) ProjectorRegistry

InitInitProjectorsRegistry initialize the ProjectorRegistry

type ProjectorsWorkerPool

type ProjectorsWorkerPool struct {
	// contains filtered or unexported fields
}

func NewProjectorsWorkerPool

func NewProjectorsWorkerPool(projectorsRegistry ProjectorRegistry) *ProjectorsWorkerPool

func (*ProjectorsWorkerPool) GetChannel

func (p *ProjectorsWorkerPool) GetChannel() chan *DataCollectedEvent

GetChannel returns the channel used by the worker pool

func (*ProjectorsWorkerPool) Run

func (p *ProjectorsWorkerPool) Run(ctx context.Context)

Run runs a pool of workers to process events

type Subscription

type Subscription struct {
	LastProjectedEventID int64
	AgentID              string `gorm:"primaryKey"`
	ProjectorID          string `gorm:"primaryKey"`
	UpdatedAt            time.Time
}

Subscription is a cursor of a projector to the stream of the events

Jump to

Keyboard shortcuts

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