Documentation
¶
Index ¶
- func DBPath() string
- func HandleRequest(conn *ipc.ConnWriter, req ipc.Request, manager *Manager)
- type DayUsage
- type LimitEvent
- type Limits
- type Manager
- func (m *Manager) Clear()
- func (m *Manager) Close()
- func (m *Manager) Flush()
- func (m *Manager) GetState() State
- func (m *Manager) SetLimits(limits Limits)
- func (m *Manager) SetState(appID string, active bool, seq int64)
- func (m *Manager) Snapshot() State
- func (m *Manager) Subscribe(id string) chan State
- func (m *Manager) Summary(days int) []DayUsage
- func (m *Manager) Unsubscribe(id string)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleRequest ¶
func HandleRequest(conn *ipc.ConnWriter, req ipc.Request, manager *Manager)
Types ¶
type LimitEvent ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) Snapshot ¶
Snapshot opens every subscription; Resync asks the shell to push its state again.
func (*Manager) Unsubscribe ¶
The shell is the only source of focus and idle state, so when its last subscription drops the open segment ends instead of counting forever.
type State ¶
type State struct {
Today DayUsage `json:"today"`
Limit *LimitEvent `json:"limit,omitempty"`
Resync bool `json:"resync,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.