Documentation ¶
Index ¶
- Constants
- func Create(uid string, partn int, connstr string, bucket string) error
- func ForceSpanSync()
- func MustRun(fn func() error) error
- func Pool(connstr string) *kvPool
- func PoolStats() map[string]uint64
- func SetRebalancer(r rebalancer)
- func SetTestAuth(user, pass string)
- func SetTimeout(tmout time.Duration)
- type AlarmRecord
- type ContextRecord
- type DeleteToken
- type Span
- type TimerEntry
- type TimerIter
- type TimerStore
- func (r *TimerStore) Cancel(ref string) error
- func (r *TimerStore) Delete(entry *TimerEntry) error
- func (r *TimerStore) Free()
- func (r *TimerStore) GetToken(e *TimerEntry) *DeleteToken
- func (r *TimerStore) Partition() int
- func (r *TimerStore) ScanDue() *TimerIter
- func (r *TimerStore) Set(due int64, ref string, context interface{}) error
- func (r *TimerStore) Stats() map[string]uint64
Constants ¶
View Source
const (
Resolution = int64(7) // seconds
)
Constants
Variables ¶
This section is empty.
Functions ¶
func ForceSpanSync ¶
func ForceSpanSync()
func SetRebalancer ¶
func SetRebalancer(r rebalancer)
func SetTestAuth ¶
func SetTestAuth(user, pass string)
func SetTimeout ¶
Types ¶
type AlarmRecord ¶
type ContextRecord ¶
type ContextRecord struct { Context interface{} `json:"ctx"` AlarmRef string `json:"alr"` }
func (*ContextRecord) String ¶
func (r *ContextRecord) String() string
type DeleteToken ¶
type DeleteToken struct { Bucket string `json:"bucket"` AlarmKey string `json:"alarm_key"` AlarmCas uint64 `json:"alarm_cas"` ContextKey string `json:"context_key"` ContextCas uint64 `json:"context_cas"` }
This can be used to delete a timer from outside this project, as follows:
- Delete context_key from bucket with context_cas, ignore any absent/mismatch error
- Delete alarm_key from bucket with alarm_cas, log any absent/mismatch error
type TimerEntry ¶
type TimerEntry struct { AlarmRecord ContextRecord // contains filtered or unexported fields }
type TimerIter ¶
type TimerIter struct {
// contains filtered or unexported fields
}
func (*TimerIter) ScanNext ¶
func (r *TimerIter) ScanNext() (*TimerEntry, error)
type TimerStore ¶
type TimerStore struct {
// contains filtered or unexported fields
}
func (*TimerStore) Cancel ¶
func (r *TimerStore) Cancel(ref string) error
func (*TimerStore) Delete ¶
func (r *TimerStore) Delete(entry *TimerEntry) error
func (*TimerStore) Free ¶
func (r *TimerStore) Free()
func (*TimerStore) GetToken ¶
func (r *TimerStore) GetToken(e *TimerEntry) *DeleteToken
func (*TimerStore) Partition ¶
func (r *TimerStore) Partition() int
func (*TimerStore) ScanDue ¶
func (r *TimerStore) ScanDue() *TimerIter
func (*TimerStore) Stats ¶
func (r *TimerStore) Stats() map[string]uint64
Click to show internal directories.
Click to hide internal directories.