Documentation ¶
Index ¶
- func AddCoroutineGroupInfo(group define.CoGroup) error
- func CloseCoroutine(co ICoroutine) (retErr error)
- func CreateAndStartStatelessCoroutine(coGroup define.CoGroup, handle define.CoroutineHandle, ...) (retErr error)
- func GetAllRegisteredGroup() (retGroups []define.CoGroup)
- func StartCoroutine(co ICoroutine) (retErr error)
- type BaseGroupStats
- type ICoroutine
- type NewCoroutineFunc
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCoroutineGroupInfo ¶
func CloseCoroutine ¶
func CloseCoroutine(co ICoroutine) (retErr error)
func CreateAndStartStatelessCoroutine ¶
func CreateAndStartStatelessCoroutine(coGroup define.CoGroup, handle define.CoroutineHandle, handleArgs ...interface{}) (retErr error)
func GetAllRegisteredGroup ¶
func StartCoroutine ¶
func StartCoroutine(co ICoroutine) (retErr error)
Types ¶
type BaseGroupStats ¶
type BaseGroupStats struct { Group define.CoGroup `json:"group,omitempty"` TotalSuccessfulCreatedNum uint64 `json:"totalSuccessfulCreatedNum,omitempty"` TotalFailedCreatNum uint64 `json:"totalFailedCreatNum,omitempty"` TotalSuccessfulStartedNum uint64 `json:"totalSuccessfulStartedNum,omitempty"` TotalFailedStartNum uint64 `json:"totalFailedStartNum,omitempty"` TotalCrashedScheduleNum uint64 `json:"totalCrashedScheduleNum,omitempty"` TotalCompletedScheduleNum uint64 `json:"totalCompletedScheduleNum,omitempty"` TotalStoppedNum uint64 `json:"totalStoppedNum,omitempty"` TotalSuccessfulClosedNum uint64 `json:"totalSuccessfulClosedNum,omitempty"` TotalFailedCloseNum uint64 `json:"totalFailedCloseNum,omitempty"` TotalRunningDurationMilliseconds uint64 `json:"totalRunningDurationMilliseconds,omitempty"` TotalRunningDurationMicroseconds uint64 `json:"totalRunningDurationMicroseconds,omitempty"` ////////////////////////////////// CurrentRunningCount uint64 `json:"currentRunningCount,omitempty"` //MaxRunningDuration uint64 AvgRunningDurationMilliseconds uint64 `json:"avgRunningDurationMilliseconds,omitempty"` AvgRunningDurationMicroseconds uint64 `json:"avgRunningDurationMicroseconds,omitempty"` }
type ICoroutine ¶
type ICoroutine interface { GetId() define.CoId GetType() define.CoType GetGroup() define.CoGroup GetStatus() define.CoStatus GetCreatedMilliseconds() int64 // contains filtered or unexported methods }
func CreateCoroutine ¶
func CreateCoroutine(coType define.CoType, coGroup define.CoGroup, interval time.Duration, handle define.CoroutineHandle, handleArgs ...interface{}) (retCo ICoroutine, retErr error)
type NewCoroutineFunc ¶
type NewCoroutineFunc func(coId define.CoId, coGroup define.CoGroup, interval time.Duration, handle define.CoroutineHandle, handleArgs ...interface{}) (ICoroutine, error)
type Stats ¶
type Stats struct { CurrentGoroutinesCount int `json:"currentGoroutinesCount"` CurrentMonitoredGoroutinesCount uint64 `json:"currentMonitoredGoroutinesCount"` CurrentUnmonitoredGoroutinesCount int `json:"currentUnmonitoredGoroutinesCount"` GroupStats []BaseGroupStats `json:"groupStats"` }
func FetchStats ¶
func FetchStats() (retStats Stats)
Click to show internal directories.
Click to hide internal directories.