Documentation ¶
Index ¶
- Constants
- func FindJournalDir() (dir string, err error)
- func IsJournalFile(name string) (format int)
- func JournalFileCmpr(f, g string) int
- func NewestJournal(inDir string) (res string, err error)
- 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)
- func SetLog(l *slog.Logger)
- type BranchConfig
- type EventRecv
- type EventSrc
- type JounalEvent
- type Journal
- type JournalOptions
- type JournalProgress
- type RawEvent
- type RecvToSrc
- type StatusEvent
- type StatusType
Constants ¶
View Source
const ( StatBackpackName = "Backpack" StatCargoName = "Cargo" StatFCMatsName = "FCMaterials" StatMarketName = "Market" StatModulesName = "Modules" StatOutfitName = "Outfitting" StatLockerName = "ShipLocker" StatShipyardName = "Shipyard" StatStatusName = "Status" )
Variables ¶
This section is empty.
Functions ¶
func FindJournalDir ¶ added in v0.8.0
func IsJournalFile ¶
Format 1: Journal.201206082715.01.log Format 2: Journal.2023-12-27T134309.01.log
func JournalFileCmpr ¶ added in v0.8.0
func NewestJournal ¶
TODO Use [JouralFileCmpr]
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 JounalEvent ¶ added in v0.6.0
func (*JounalEvent) Clone ¶ added in v0.8.0
func (e *JounalEvent) Clone() JounalEvent
type Journal ¶ added in v0.8.0
type Journal struct {
// contains filtered or unexported fields
}
func NewJournal ¶ added in v0.8.0
func NewJournal(dir string, r EventRecv, opt *JournalOptions) *Journal
type JournalOptions ¶ added in v0.8.0
type JournalOptions struct {
SerialIndependent []string
}
type JournalProgress ¶ added in v0.8.0
type JournalProgress struct {
// contains filtered or unexported fields
}
func (*JournalProgress) EventNo ¶ added in v0.8.0
func (jp *JournalProgress) EventNo() int
func (*JournalProgress) File ¶ added in v0.8.0
func (jp *JournalProgress) File() string
func (*JournalProgress) IsNew ¶ added in v0.8.0
func (jp *JournalProgress) IsNew(file string, n int) bool
func (*JournalProgress) Reset ¶ added in v0.8.0
func (jp *JournalProgress) Reset()
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 }
func (*StatusEvent) Clone ¶ added in v0.8.0
func (e *StatusEvent) Clone() StatusEvent
type StatusType ¶ added in v0.6.0
type StatusType int
const ( StatBackpack StatusType = iota + 1 StatCargo StatFCMats StatMarket StatModules StatOutfit StatLocker StatShipyard StatStatus EndStatusType )
func IsStatusFile ¶ added in v0.8.0
func IsStatusFile(name string) StatusType
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.