Documentation
¶
Index ¶
- Constants
- func LogCfg() c4hgol.Group
- func Peek(str []byte) (t time.Time, event string, err error)
- func PeekEvent(str []byte) (event string, err error)
- func PeekTime(str []byte) (t time.Time, err error)
- type BranchConfig
- type EventRecv
- type EventSrc
- type JEIDCounter
- type JEventID
- type JounalEvent
- type RawEvent
- type RecvToSrc
- type StatusEvent
- type StatusType
Constants ¶
View Source
const ( StatCargoName = "Cargo" StatMarketName = "Market" StatModulesName = "ModuleInfo" StatOutfitName = "Outfitting" StatShipyardName = "Shipyard" StatStatusName = "Status" )
View Source
const (
JESequenceMask = (1 << jeSequenceBits) - 1
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BranchConfig ¶ added in v0.6.0
type EventRecv ¶ added in v0.6.0
type EventRecv interface { OnJournalEvent(e JounalEvent) error OnStatusEvent(e StatusEvent) error Close() error }
type EventSrc ¶ added in v0.6.0
type EventSrc struct { Journal <-chan JounalEvent Status <-chan StatusEvent }
type JEIDCounter ¶ added in v0.6.7
type JEIDCounter struct {
// contains filtered or unexported fields
}
JEIDCounter generates unique journal event IDs from the event timestamp and a sequence part that numbers all events from one second. JEIDCounter requires that not more than 2^jeSequenceBits=1024 events per second occur.
func (*JEIDCounter) Count ¶ added in v0.6.7
func (idc *JEIDCounter) Count(t time.Time) (JEventID, error)
func (*JEIDCounter) CountUnix ¶ added in v0.6.7
func (idc *JEIDCounter) CountUnix(tu int64) (JEventID, error)
func (*JEIDCounter) Last ¶ added in v0.6.7
func (idc *JEIDCounter) Last() JEventID
func (*JEIDCounter) SetLast ¶ added in v0.6.7
func (idc *JEIDCounter) SetLast(jeid JEventID)
type JounalEvent ¶ added in v0.6.0
type RecvToSrc ¶ added in v0.6.0
type RecvToSrc struct {
// contains filtered or unexported fields
}
func (*RecvToSrc) Branch ¶ added in v0.6.0
func (rs *RecvToSrc) Branch(cfg BranchConfig) EventSrc
func (*RecvToSrc) OnJournalEvent ¶ added in v0.6.4
func (rs *RecvToSrc) OnJournalEvent(e JounalEvent) error
func (*RecvToSrc) OnStatusEvent ¶ added in v0.6.4
func (rs *RecvToSrc) OnStatusEvent(e StatusEvent) error
type StatusEvent ¶ added in v0.6.0
type StatusEvent struct { Type StatusType Event RawEvent }
type StatusType ¶ added in v0.6.0
type StatusType int
const ( StatCargo StatusType = iota + 1 StatMarket StatModules StatOutfit StatShipyard StatStatus )
func ParseStatusType ¶ added in v0.6.0
func ParseStatusType(s string) StatusType
func (StatusType) String ¶ added in v0.6.0
func (st StatusType) String() string
Click to show internal directories.
Click to hide internal directories.