Documentation ¶
Index ¶
- Constants
- Variables
- func InitConsoleLogger(colors bool)
- func InitSystemBus()
- func Log(level int, b []byte, ei *string, ai *string, raw bool)
- func LogCritical(s string, re *string)
- func LogDebug(s string, re *string)
- func LogErr(s string, re *string)
- func LogInfo(s string, re *string)
- func LogWarn(s string, re *string)
- func NewWebSocketLogger(conn *websocket.Conn, clientUUID string)
- func PublishEvent(eid int, re *string)
- func PublishEventWithExtra(eid int, re *string, extra map[string]interface{})
- func PublishFeedBack(fback *FeedBack)
- func PublishFiltered(clientUUIDFilter string, extra map[string]interface{})
- func PublishState(runningIDs []string, state int, re *string)
- func SBusConnect(fLink *FeedBackLink)
- func SBusDisconnect(fLink *FeedBackLink)
- type ConsoleLogger
- type ExecutionsRegistry
- type FeedBack
- type FeedBackLink
- type FeedBackType
- type Logger
- func (l *Logger) ByteLogErr(b []byte)
- func (l *Logger) ByteLogInfo(b []byte)
- func (l *Logger) Duplicate() base.ILogger
- func (l *Logger) LogCritical(s string)
- func (l *Logger) LogDebug(s string)
- func (l *Logger) LogErr(s string)
- func (l *Logger) LogInfo(s string)
- func (l *Logger) LogWarn(s string)
- func (l *Logger) SetActionID(ai string)
- type SystemBus
- type WSocketLogger
Constants ¶
View Source
const ( // EventDirectorStarting const 0 EventDirectorStarting int = iota // EventDirectorStarted const 1 EventDirectorStarted // EventDirectorPause const 2 EventDirectorPause // EventDirectorOut const 3 EventDirectorOut // EventManagerPrepareBPStart const 4 EventManagerPrepareBPStart // EventManagerPrepareBPEnd const 5 EventManagerPrepareBPEnd // EventManagerPrepareBPEndWithErr const 6 EventManagerPrepareBPEndWithErr // EventManagerStarting const 7 EventManagerStarting // EventManagerResuming const 8 EventManagerResuming // EventManagerStarted const 9 EventManagerStarted // EventManagerPausing const 10 EventManagerPausing // EventManagerPause const 11 EventManagerPaused // EventManagerStopping const 12 EventManagerStopping // EventManagerOut const 13 EventManagerOut // EventRegisteredManager 14 EventRegisteredManager // EventWaitingStatus 15 EventWaitingForState )
View Source
const CriticalLevel = 50
CriticalLevel const
View Source
const DebugLevel = 10
DebugLevel const
View Source
const ErrorLevel = 40
ErrorLevel const
View Source
const InfoLevel = 20
InfoLevel const
View Source
const NotsetLevel = 0
NotsetLevel const
View Source
const WarningLevel = 30
WarningLevel const
Variables ¶
View Source
var ER = &ExecutionsRegistry{ ByClientUUID: make(map[string]map[string]bool), }
Functions ¶
func NewWebSocketLogger ¶
NewWebSocketLogger handles websocket requests from the peer.
func PublishEventWithExtra ¶
PublishEvent func
func PublishFiltered ¶
PublishFiltered func
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
ConsoleLogger struct
type ExecutionsRegistry ¶
type ExecutionsRegistry struct { ByClientUUID map[string]map[string]bool // contains filtered or unexported fields }
func (*ExecutionsRegistry) GetByClient ¶
func (e *ExecutionsRegistry) GetByClient(clientUUID string) (map[string]bool, error)
type FeedBack ¶
type FeedBack struct { Timestamp int64 `json:"timestamp"` // // Type of feedback TypeID FeedBackType `json:"type_id"` ActionID *string `json:"action_id"` // Msg data in bytes B []byte `json:"log_bytes"` LogLevel *int `json:"log_level"` EOF bool // Event id EventID *int `json:"event_id"` // State id LastKnownEventID *int `json:"last_known_event_id"` // Extra data Extra map[string]interface{} `json:"extra"` // Manager *executive.Manager ExecutionUUID *string `json:"execution_uuid"` // Filtered feedback, sent only to client with this UUID ClientUUIDFilter *string `json:"-"` // Raw data Raw bool `json:"raw"` }
FeedBack struct
type FeedBackLink ¶
FeedBackLink struct. Used to connect consumer with FeedBack dispatcher
type FeedBackType ¶
type FeedBackType int
FeedBackType int
const ( // FeedBackLog const 0 FeedBackLog FeedBackType = iota // FeedBackEvent const 1 FeedBackEvent // FeedBackStatus const 2 FeedBackStatus // FeedBackFiltered const used in conjuction with ClientUUIDFilter to send // messages only to one log/event listener: commonly the websocket logger // to command to join into uuid channel using Extra["join"]=uuid FeedBackFiltered // FeedBackEOF const 4 FeedBackEOF )
type SystemBus ¶
type SystemBus struct {
// contains filtered or unexported fields
}
SystemBus struct
var SBus *SystemBus
SBus is a globally shared system bus
func (*SystemBus) GetProviderInitFunc ¶
func (s *SystemBus) GetProviderInitFunc(strname string) (base.ProviderInitFunc, error)
GetProviderInitFunc func
func (*SystemBus) RegisterProviderInitFunc ¶
func (s *SystemBus) RegisterProviderInitFunc(strname string, initfunc base.ProviderInitFunc)
RegisterProviderInitFunc func
type WSocketLogger ¶
type WSocketLogger struct {
// contains filtered or unexported fields
}
WSocketLogger is a middleman between the websocket connection and the SBus.
Click to show internal directories.
Click to hide internal directories.