Documentation ¶
Index ¶
- Constants
- type EventType
- type ID
- type Session
- type SessionEvent
- type SessionManager
- func (sm *SessionManager) BeginSession(production bool) (*Session, error)
- func (sm *SessionManager) EndSession() (*Session, error)
- func (sm *SessionManager) GetLatestSession() (*Session, error)
- func (sm *SessionManager) PauseSession() (*Session, error)
- func (sm *SessionManager) ResumeSession() (*Session, error)
- func (sm *SessionManager) SubscribeToEvents() <-chan *SessionEvent
- type SessionMatcher
Constants ¶
View Source
const EVENT_CHAN_BUFFER = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct { Id ID `yaml:"id"` Paused bool `yaml:"paused"` Complete bool `yaml:"complete"` Production bool `yaml:"production"` ProductionId ID `yaml:"production_id"` }
func (*Session) ToProto ¶
func (s *Session) ToProto() *machinepb.SessionStatus
type SessionEvent ¶
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(useMemoryStorage bool) *SessionManager
func (*SessionManager) BeginSession ¶
func (sm *SessionManager) BeginSession(production bool) (*Session, error)
BeginSession will attempt to begin a new session
func (*SessionManager) EndSession ¶
func (sm *SessionManager) EndSession() (*Session, error)
EndSession will end a session if one is in progress
func (*SessionManager) GetLatestSession ¶
func (sm *SessionManager) GetLatestSession() (*Session, error)
GetLatestSession returns nil, nil if there are no sessions yet
func (*SessionManager) PauseSession ¶
func (sm *SessionManager) PauseSession() (*Session, error)
PauseSession will pause a current session
func (*SessionManager) ResumeSession ¶
func (sm *SessionManager) ResumeSession() (*Session, error)
ResumeSession will resume a paused in-progress session
func (*SessionManager) SubscribeToEvents ¶
func (sm *SessionManager) SubscribeToEvents() <-chan *SessionEvent
Click to show internal directories.
Click to hide internal directories.