connector

package
v0.0.0-...-9aad4f2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStudyConfs

func GetStudyConfs(pool *pgxpool.Pool, dataSource string) ([]*Source, error)

func LastEvent

func LastEvent(pool *pgxpool.Pool, source *Source, orderBy string) (*InferenceDataEvent, bool, error)

func LoadEvents

func LoadEvents(connector Connector, dataSource string, orderColumn string)

func WriteEvents

func WriteEvents(pool *pgxpool.Pool, study string, events <-chan *InferenceDataEvent) (int, error)

Types

type Config

type Config struct {
	DB string `env:"PG_URL,required"` // postgres://user:password@host:port/db

}

type Connector

type Connector interface {
	Handler(source *Source, lastEvent *InferenceDataEvent) <-chan *InferenceDataEvent
}

Jump to

Keyboard shortcuts

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