improving comments

master
Stephen Searles 7 years ago
parent e3f958c10e
commit dc052bbc69
  1. 14
      idleshut.go

@ -6,22 +6,22 @@ import (
"time" "time"
) )
// Config are the options for creating a new process // Config contains the options for creating a new process.
type Config struct { type Config struct {
// Start is called by Process.Start. If an error is returned, // Start, if non-nil, is called by Process.Start. If an error is returned,
// starting the process is aborted. // starting the process is aborted.
Start func() error Start func() error
// Stop is called by Process.Stop. If an error is returned, // Stop, if non-nil, is called by Process.Stop. If an error is returned,
// stopping the process is aborted. // stopping the process is aborted.
Stop func() error Stop func() error
// If TickDuration is non-zero, the process will count ticks where // If TickDuration is non-zero, the process will count ticks where
// the process is active or idle, identified as active by calling // the process is active or idle. Process are kept active by the user
// the Touch() method. When the process has been idle for more than // calling the Process.Touch() method. When the process has been idle for
// MaxIdleTicks, it will be stopped. If ticking is enabled, TickError // more than MaxIdleTicks, it will be stopped. If ticking is enabled,
// must be set or operations will result in a panic. // TickError must be set or operations will result in a panic.
TickDuration time.Duration TickDuration time.Duration
TickError func(error) TickError func(error)

Loading…
Cancel
Save