bgs

package
v0.0.0-...-45ae864 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeoutShutdown = fmt.Errorf("timed out waiting for new events")
View Source
var EventsTimeout = time.Minute

Functions

This section is empty.

Types

type BGS

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

func NewBGS

func NewBGS(db *gorm.DB, ix *indexer.Indexer, repoman *repomgr.RepoManager, evtman *events.EventManager, didr plc.PLCClient) *BGS

func (*BGS) EventsHandler

func (bgs *BGS) EventsHandler(c echo.Context) error

func (*BGS) Start

func (bgs *BGS) Start(listen string) error

type IndexCallback

type IndexCallback func(context.Context, *PDS, *events.Event) error

type PDS

type PDS struct {
	gorm.Model

	Host string
}

type Slurper

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

TODO: rename me

func NewSlurper

func NewSlurper(db *gorm.DB, cb IndexCallback) *Slurper

func (*Slurper) SubscribeToPds

func (s *Slurper) SubscribeToPds(ctx context.Context, host string) error

type User

type User struct {
	gorm.Model
	Handle string `gorm:"uniqueIndex"`
	Did    string `gorm:"uniqueIndex"`
	PDS    uint
}

Jump to

Keyboard shortcuts

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