Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- type Event
- type Registry
- func (r *Registry) AttachIfRunning(ctx context.Context, sid libacp.SessionID, viewer Viewer) (*Turn, bool, error)
- func (r *Registry) Cancel(sid libacp.SessionID) bool
- func (r *Registry) Close() error
- func (r *Registry) Get(sid libacp.SessionID) (TurnStatus, bool)
- func (r *Registry) List() []TurnStatus
- func (r *Registry) ReapIdle(_ context.Context) error
- func (r *Registry) Start(sid libacp.SessionID, fn TurnFunc, viewer Viewer) (*Turn, bool, error)
- func (r *Registry) StartIfIdle(sid libacp.SessionID, fn TurnFunc, viewer Viewer) (*Turn, bool, error)
- func (r *Registry) Stop(sid libacp.SessionID) bool
- type Result
- type Turn
- type TurnFunc
- type TurnStatus
- type Viewer
Constants ¶
View Source
const ( DefaultTurnDeadline = 15 * time.Minute DefaultGraceWindow = 60 * time.Second DefaultJournalSize = 512 )
View Source
const ( StateRunning = "running" StateGrace = "grace" StateFinished = "finished" )
Variables ¶
View Source
var ErrClosed = errors.New("nativeturn: registry is closed")
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Seq uint64
Update libacp.SessionNotification
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) AttachIfRunning ¶
func (*Registry) List ¶
func (r *Registry) List() []TurnStatus
func (*Registry) StartIfIdle ¶
type Result ¶
type Result struct {
StopReason libacp.StopReason
Err error
}
type TurnStatus ¶
Click to show internal directories.
Click to hide internal directories.