config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BasepathBook        string
	BasepathJump        string
	BasepathRelay       string
	EmailAuthType       string
	EmailFrom           string
	EmailHost           string
	EmailLink           string
	EmailPassword       string
	EmailPort           int
	EmailTo             []string
	EmailCc             []string
	EmailSubject        string
	HealthEvents        int
	HealthLastChecked   time.Duration
	HealthLastActive    time.Duration
	HealthStartup       time.Duration
	HealthLogEvery      time.Duration
	HostBook            string
	HostJump            string
	HostRelay           string
	Port                int
	QueryBookEvery      time.Duration
	ReconnectJumpEvery  time.Duration
	ReconnectRelayEvery time.Duration
	SecretBook          string
	SecretJump          string
	SecretRelay         string
	SendEmail           bool
	SchemeBook          string
	SchemeJump          string
	SchemeRelay         string
	TimeoutBook         time.Duration
}

type HealthEvent

type HealthEvent struct {
	Healthy  bool
	Issues   []string
	JumpOK   bool
	StreamOK map[string]bool
	When     time.Time
}

type HealthyIssues

type HealthyIssues struct {
	Healthy     bool
	JumpHealthy bool
	Issues      []string
}

type Report

type Report struct {
	Available           bool
	FirstChecked        time.Time
	Healthy             bool
	HealthEvents        []HealthEvent
	JumpOK              bool
	JumpHealthy         bool
	JumpReport          jc.Report
	LastCheckedJump     time.Time
	LastCheckedStreams  time.Time
	LastFoundInManifest time.Time
	ResourceName        string
	StreamOK            map[string]bool
	StreamReports       map[string]rc.Report
	StreamRequired      map[string]bool
}

Report represents the status

type Status

type Status struct {
	*sync.RWMutex
	Config Config
	// key is the topic_stub,m e.g. pend00 (and not the resource name r-pend00)
	Experiments map[string]Report
	Now         func() time.Time
}

Status represents the overall status of the experiments

func New

func New() *Status

New returns an Status with initialised maps

func (*Status) ClearExperiments

func (s *Status) ClearExperiments()

func (*Status) SetNow

func (s *Status) SetNow(now func() time.Time)

func (*Status) WithConfig

func (s *Status) WithConfig(config Config) *Status

Jump to

Keyboard shortcuts

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