airbyte

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionCount

type ConnectionCount struct {
	DestinationConnector string `db:"destination"`
	SourceConnector      string `db:"source"`
	Status               string `db:"status"`
	Count                uint   `db:"count"`
}

ConnectionCount holds a count of Airbyte connections, grouped by destination connector, source connector and status.

type JobCount

type JobCount struct {
	DestinationConnector string `db:"destination"`
	SourceConnector      string `db:"source"`
	Type                 string `db:"config_type"`
	Status               string `db:"status"`
	Count                uint   `db:"count"`
}

JobCount holds a count of Airbyte jobs, grouped by destination connector, source connector, type and status.

type Metrics

type Metrics struct {
	// Airbyte connections
	Connections []ConnectionCount

	// Airbyte jobs
	JobsCompleted []JobCount
	JobsPending   []JobCount
	JobsRunning   []JobCount
}

Metrics represents available Airbyte metrics.

type Repository

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

Repository provides an abstraction layer to perform SQL queries against the Airbyte PostgreSQL database.

func NewRepository

func NewRepository(db *sqlx.DB) *Repository

NewRepository initializes and returns an Airbyte Repository.

func (*Repository) ConnectionsCount

func (r *Repository) ConnectionsCount() ([]ConnectionCount, error)

ConnectionsCount returns the count of Airbyte connections, grouped by destination, source and status.

func (*Repository) JobsCompletedCount

func (r *Repository) JobsCompletedCount() ([]JobCount, error)

JobsCompletedCount returns the count of completed Airbyte jobs, grouped by destination, source, type and status.

func (*Repository) JobsPendingCount

func (r *Repository) JobsPendingCount() ([]JobCount, error)

JobsPendingCount returns the count of pending Airbyte jobs, grouped by destination, source and type.

func (*Repository) JobsRunningCount

func (r *Repository) JobsRunningCount() ([]JobCount, error)

JobsRunningCount returns the count of running Airbyte jobs, grouped by destination, source and type.

type Service

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

Service handles domain operations for gathering metrics from Airbyte's PostgreSQL database.

func NewService

func NewService(r *Repository) *Service

NewService initializes and returns an Airbyte Service.

func (*Service) GatherMetrics

func (s *Service) GatherMetrics() (*Metrics, error)

GatherMetrics gathers and returns metrics from Airbyte's PostgreSQL database.

Jump to

Keyboard shortcuts

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