Documentation
¶
Index ¶
- func MustNewRPCHandler(apis map[string]interface{}) http.Handler
- func MustServe(endpoint string, handler http.Handler)
- func MustServeRPC(endpoint string, apis map[string]interface{})
- func Schedule(action func() error, interval time.Duration, errorMessage string)
- func ScheduleNow(action func() error, interval time.Duration, errorMessage string)
- func WaitUntil(fn func() error, timeout time.Duration) error
- type Reminder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewRPCHandler ¶ added in v0.4.2
MustNewRPCHandler creates a http.Handler for the specified RPC apis.
func MustServeRPC ¶ added in v0.3.0
MustServeRPC starts RPC service until shutdown.
func ScheduleNow ¶ added in v0.3.1
ScheduleNow runs the specified `action` immediately and periodically.
Types ¶
type Reminder ¶
type Reminder struct {
// contains filtered or unexported fields
}
Reminder is used for time consuming operations to remind user about progress.
func NewReminder ¶
NewReminder returns a new Reminder instance.
`level`: log level to remind in general.
`interval`: interval to remind in warning level.
func (*Reminder) RemindWith ¶
RemindWith reminds about specified `message` along with `key` and `value`.
Click to show internal directories.
Click to hide internal directories.