Documentation ¶
Index ¶
- Constants
- type Spec
- type StatusSyncController
- func (ssc *StatusSyncController) Category() supervisor.ObjectCategory
- func (ssc *StatusSyncController) Close()
- func (ssc *StatusSyncController) DefaultSpec() interface{}
- func (ssc *StatusSyncController) GetStatusesRecords() []*StatusesRecord
- func (ssc *StatusSyncController) Inherit(spec *supervisor.Spec, previousGeneration supervisor.Object)
- func (ssc *StatusSyncController) Init(superSpec *supervisor.Spec)
- func (ssc *StatusSyncController) Kind() string
- func (ssc *StatusSyncController) Status() *supervisor.Status
- type StatusesRecord
Constants ¶
View Source
const ( // Category is the category of StatusSyncController. Category = supervisor.CategorySystemController // Kind is the kind of StatusSyncController. Kind = "StatusSyncController" )
View Source
const ( // SyncStatusPaceInUnixSeconds must be 5s because the rates of http stat. // https://github.com/rcrowley/go-metrics/blob/3113b8401b8a98917cde58f8bbd42a1b1c03b1fd/ewma.go#L98-L99 SyncStatusPaceInUnixSeconds = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusSyncController ¶
type StatusSyncController struct { StatusesRecordsMutex sync.RWMutex // contains filtered or unexported fields }
StatusSyncController is a system controller to synchronize status of every object to remote storage.
func (*StatusSyncController) Category ¶
func (ssc *StatusSyncController) Category() supervisor.ObjectCategory
Category returns the category of StatusSyncController.
func (*StatusSyncController) Close ¶
func (ssc *StatusSyncController) Close()
Close closes StatusSyncController.
func (*StatusSyncController) DefaultSpec ¶
func (ssc *StatusSyncController) DefaultSpec() interface{}
DefaultSpec returns the default spec of StatusSyncController.
func (*StatusSyncController) GetStatusesRecords ¶
func (ssc *StatusSyncController) GetStatusesRecords() []*StatusesRecord
GetStatusesRecords return the latest statuses records.
func (*StatusSyncController) Inherit ¶
func (ssc *StatusSyncController) Inherit(spec *supervisor.Spec, previousGeneration supervisor.Object)
Inherit inherits previous generation of StatusSyncController.
func (*StatusSyncController) Init ¶
func (ssc *StatusSyncController) Init(superSpec *supervisor.Spec)
Init initializes StatusSyncController.
func (*StatusSyncController) Kind ¶
func (ssc *StatusSyncController) Kind() string
Kind return the kind of StatusSyncController.
func (*StatusSyncController) Status ¶
func (ssc *StatusSyncController) Status() *supervisor.Status
Status returns the status of StatusSyncController.
type StatusesRecord ¶
type StatusesRecord struct { Statuses map[string]*supervisor.Status UnixTimestamp int64 }
StatusesRecord is the history record for status of every running object.
Click to show internal directories.
Click to hide internal directories.