Documentation ¶
Index ¶
- Variables
- type Stats
- type T
- func (t *T) CopyWithStats(ctx context.Context, dst io.Writer, src io.Reader, stats *Stats) (uint64, error)
- func (t *T) GetMaxDelay(lastSync time.Time) *time.Duration
- func (t *T) GetTargetNodenames(target, nodes, drpNodes []string) []string
- func (t *T) GetTargetPeernames(target, nodes, drpNodes []string) []string
- func (t *T) IsInstanceSufficientlyStarted(ctx context.Context) (v bool, rids []string)
- func (t *T) StatusLastSync(nodenames []string) status.T
- func (t T) WriteLastSync(nodename string) error
- func (t T) WritePeerLastSync(peer string, peers []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KWMaxDelay = keywords.Keyword{ Aliases: []string{"sync_max_delay"}, Attr: "MaxDelay", Converter: converters.Duration, DefaultOption: "sync_max_delay", Option: "max_delay", Text: keywords.NewText(fs, "text/kw/max_delay"), } KWSchedule = keywords.Keyword{ Attr: "Schedule", DefaultOption: "sync_schedule", Example: "00:00-01:00 mon", Option: "schedule", Scopable: true, Text: keywords.NewText(fs, "text/kw/schedule"), } BaseKeywords = append( []keywords.Keyword{}, KWMaxDelay, KWSchedule, ) )
Functions ¶
This section is empty.
Types ¶
type Stats ¶
type T ¶
type T struct { resource.T MaxDelay *time.Duration `json:"max_delay"` Schedule string `json:"schedule"` Path naming.Path `json:"path"` }
func (*T) CopyWithStats ¶
func (*T) GetMaxDelay ¶
GetMaxDelay return the configured max_delay if set. If not set, return the duration from now to the end of the next schedule period.
func (*T) GetTargetNodenames ¶
func (*T) GetTargetPeernames ¶
func (*T) IsInstanceSufficientlyStarted ¶
func (T) WriteLastSync ¶
Click to show internal directories.
Click to hide internal directories.