CovenantSQL: Index | Files | Directories

package observer

import ""


Package Files

api.go config.go observer.go service.go worker.go


var (
    // ErrStopped defines error on observer service has already stopped
    ErrStopped = errors.New("observer service has stopped")
    // ErrNotFound defines error on fail to found specified resource
    ErrNotFound = errors.New("resource not found")
    // ErrInconsistentData represents corrupted observation data.
    ErrInconsistentData = errors.New("inconsistent data")

func StopObserver Uses

func StopObserver(service *Service, httpServer *http.Server) (err error)

StopObserver stops the service and http API server returned by StartObserver.

type Config Uses

type Config struct {
    Databases []Database `yaml:"Databases"`

Config defines subscription settings for observer.

type Database Uses

type Database struct {
    ID       string `yaml:"ID"`
    Position string `yaml:"Position"`

Database defines single database subscription status.

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service defines the observer service structure.

func NewService Uses

func NewService() (service *Service, err error)

NewService creates new observer service and load previous subscription from the meta database.

func StartObserver Uses

func StartObserver(listenAddr string, version string) (service *Service, httpServer *http.Server, err error)

StartObserver starts the observer service and http API server.



Package observer imports 31 packages (graph). Updated 2019-05-18. Refresh now. Tools for package owners.