cast

package
v0.0.0-...-dc3d092 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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 InitConsoleLogger

func InitConsoleLogger(colors bool)

InitConsoleLogger func

func InitSystemBus

func InitSystemBus()

InitSystemBus func

func Log

func Log(level int, b []byte, ei *string, ai *string, raw bool)

Log func

func LogCritical

func LogCritical(s string, re *string)

LogCritical func

func LogDebug

func LogDebug(s string, re *string)

LogDebug func

func LogErr

func LogErr(s string, re *string)

LogErr func

func LogInfo

func LogInfo(s string, re *string)

LogInfo func

func LogWarn

func LogWarn(s string, re *string)

LogWarn func

func NewWebSocketLogger

func NewWebSocketLogger(conn *websocket.Conn, clientUUID string)

NewWebSocketLogger handles websocket requests from the peer.

func PublishEvent

func PublishEvent(eid int, re *string)

PublishEvent func

func PublishEventWithExtra

func PublishEventWithExtra(eid int, re *string, extra map[string]interface{})

PublishEvent func

func PublishFeedBack

func PublishFeedBack(fback *FeedBack)

PublishFeedBack func

func PublishFiltered

func PublishFiltered(clientUUIDFilter string, extra map[string]interface{})

PublishFiltered func

func PublishState

func PublishState(runningIDs []string, state int, re *string)

PublishState func

func SBusConnect

func SBusConnect(fLink *FeedBackLink)

SBusConnect func

func SBusDisconnect

func SBusDisconnect(fLink *FeedBackLink)

SBusDisconnect 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 struct {
	ClientUUID  string
	FeedBackBus chan *FeedBack
}

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 Logger

type Logger struct {
	ExecutionUUID *string
	ActionID      *string
}

Logger struct

func (*Logger) ByteLogErr

func (l *Logger) ByteLogErr(b []byte)

ByteLogErr func

func (*Logger) ByteLogInfo

func (l *Logger) ByteLogInfo(b []byte)

ByteLogInfo func

func (*Logger) Duplicate

func (l *Logger) Duplicate() base.ILogger

Duplicate func

func (*Logger) LogCritical

func (l *Logger) LogCritical(s string)

LogCritical func

func (*Logger) LogDebug

func (l *Logger) LogDebug(s string)

LogDebug func

func (*Logger) LogErr

func (l *Logger) LogErr(s string)

LogErr func

func (*Logger) LogInfo

func (l *Logger) LogInfo(s string)

LogInfo func

func (*Logger) LogWarn

func (l *Logger) LogWarn(s string)

LogWarn func

func (*Logger) SetActionID

func (l *Logger) SetActionID(ai string)

SetActionID func

type SystemBus

type SystemBus struct {
	// contains filtered or unexported fields
}

SystemBus struct

var SBus *SystemBus

SBus is a globally shared system bus

func (*SystemBus) Close

func (s *SystemBus) Close() *sync.WaitGroup

Close func

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

func (*SystemBus) Start

func (s *SystemBus) Start()

Start func

type WSocketLogger

type WSocketLogger struct {
	// contains filtered or unexported fields
}

WSocketLogger is a middleman between the websocket connection and the SBus.

Jump to

Keyboard shortcuts

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