inreaders

package
v0.0.0-...-51c274e Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLog

func SetLog(log *logging.Logger, debug bool)

Types

type InputReader

type InputReader interface {
	SetId__(byte)
	GetId__() byte

	SetReading(bool)

	GetLastErr__() string
	SetLastErr(string)

	SetLastHeartbeatNow()
	GetLastHeartbeat() time.Time
	Run(string) ReasonNotRunning
	GetReaderBaseStats__() *InputReaderBaseStats
	IsOutputClosed() bool
	SetOutputClosed(bool)
	sync.Locker
	// contains filtered or unexported methods
}

type InputReaderBase

type InputReaderBase struct {
	ReadingSince time.Time

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewInputReaderBase

func NewInputReaderBase() *InputReaderBase

func (*InputReaderBase) GetId__

func (r *InputReaderBase) GetId__() byte

func (*InputReaderBase) GetLastErr__

func (r *InputReaderBase) GetLastErr__() string

func (*InputReaderBase) GetLastHeartbeat

func (r *InputReaderBase) GetLastHeartbeat() time.Time

func (*InputReaderBase) GetOnHoldInfo__

func (r *InputReaderBase) GetOnHoldInfo__() ReasonNotRunning

func (*InputReaderBase) GetReaderBaseStats__

func (r *InputReaderBase) GetReaderBaseStats__() *InputReaderBaseStats

func (*InputReaderBase) IsOutputClosed

func (r *InputReaderBase) IsOutputClosed() bool

func (*InputReaderBase) SetId__

func (r *InputReaderBase) SetId__(id byte)

func (*InputReaderBase) SetLastErr

func (r *InputReaderBase) SetLastErr(err string)

func (*InputReaderBase) SetLastHeartbeatNow

func (r *InputReaderBase) SetLastHeartbeatNow()

func (*InputReaderBase) SetOutputClosed

func (r *InputReaderBase) SetOutputClosed(closed bool)

func (*InputReaderBase) SetReading

func (r *InputReaderBase) SetReading(reading bool)

type InputReaderBaseStats

type InputReaderBaseStats struct {
	Running         bool   `json:"running"`
	LastErr         string `json:"lastErr"`
	RunningSinceTs  uint64 `json:"runningSince"`
	LastHeartbeatTs uint64 `json:"lastHeartbeat"`
	OutputClosed    bool   `json:"outputClosed"`
}

type InputReaderSet

type InputReaderSet struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewInputReaderSet

func NewInputReaderSet(name string) *InputReaderSet

func (*InputReaderSet) AddInputReader

func (irs *InputReaderSet) AddInputReader(name string, ir InputReader)

func (*InputReaderSet) ForEach

func (irs *InputReaderSet) ForEach(callback func(name string, ir InputReader))

func (*InputReaderSet) NumRunning

func (irs *InputReaderSet) NumRunning() int

type ReasonNotRunning

type ReasonNotRunning string
const (
	REASON_NORUN_NONE         ReasonNotRunning = "undef"
	REASON_NORUN_ERROR        ReasonNotRunning = "error"
	REASON_NORUN_ONHOLD_10MIN ReasonNotRunning = "onHold10min"
	REASON_NORUN_ONHOLD_15MIN ReasonNotRunning = "onHold15min"
	REASON_NORUN_ONHOLD_30MIN ReasonNotRunning = "onHold30min"
	REASON_NORUN_ONHOLD_1H    ReasonNotRunning = "onHold1h"
)

Jump to

Keyboard shortcuts

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