Documentation
¶
Index ¶
- func TODO() error
- type ProcessLeaseFunc
- type Service
- type ServiceOption
- func WithBackupStore(backupStore bs.BackupStore) ServiceOption
- func WithLeaseDurationSeconds(seconds int32) ServiceOption
- func WithNodeStatusUpdateFrequency(frequency time.Duration) ServiceOption
- func WithOplog(ol component.OperationLogFile) ServiceOption
- func WithRepoMirror(mirror string) ServiceOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProcessLeaseFunc ¶
type ProcessLeaseFunc func(*coordinationv1.Lease) error
ProcessLeaseFunc processes the given lease in-place
type Service ¶
type Service struct { NodeReportSubject string AgentID string IPDetect string Region string AgentSubject string RegisterNode bool // nodeStatusUpdateFrequency specifies how often kubelet computes node status. If node lease // feature is not enabled, it is also the frequency that kubelet posts node status to master. // In that case, be cautious when changing the constant, it must work with nodeMonitorGracePeriod // in nodecontroller. There are several constraints: // 1. nodeMonitorGracePeriod must be N times more than nodeStatusUpdateFrequency, where // N means number of retries allowed for kubelet to post node status. It is pointless // to make nodeMonitorGracePeriod be less than nodeStatusUpdateFrequency, since there // will only be fresh values from Kubelet at an interval of nodeStatusUpdateFrequency. // The constant must be less than podEvictionTimeout. // 2. nodeStatusUpdateFrequency needs to be large enough for kubelet to generate node // status. Kubelet may fail to update node status reliably if the value is too small, // as it takes time to gather all necessary node information. NodeStatusUpdateFrequency time.Duration // contains filtered or unexported fields }
func NewService ¶
func NewService(agentID, region, ipDetectMethod string, registerNode bool, natOpts *natsio.NatsOptions, opts ...ServiceOption) *Service
func (*Service) PrepareRun ¶
type ServiceOption ¶
type ServiceOption func(*Service)
func WithBackupStore ¶
func WithBackupStore(backupStore bs.BackupStore) ServiceOption
func WithLeaseDurationSeconds ¶
func WithLeaseDurationSeconds(seconds int32) ServiceOption
func WithNodeStatusUpdateFrequency ¶
func WithNodeStatusUpdateFrequency(frequency time.Duration) ServiceOption
func WithOplog ¶
func WithOplog(ol component.OperationLogFile) ServiceOption
func WithRepoMirror ¶
func WithRepoMirror(mirror string) ServiceOption
Click to show internal directories.
Click to hide internal directories.