Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiFS ¶
MultiFS allows to attach multiple file systems to application bundle. File systems are being searched for file in the order they are attached. MultiFS embeds sync.RWLock for protection from possible data races.
type MultiSession ¶
type MultiSession struct { // Session identifier implementation. Who session.Identifier // Session store implementation. Store session.Store // Session event bus. EventBus event.Bus }
MultiSessions supports multiple sessions with persistence mechanism provided by session Store. By default newly created session' context is initialized with context.Background() unless session context fields is set.
type Reactor ¶
type Reactor struct {
// contains filtered or unexported fields
}
Reactor implements event.Bus interface and establishes event processing.
func NewReactor ¶
func NewReactor() *Reactor
type SessionPool ¶
SessionPool implements session.Store interface and provides in-memoty session store based on sync.Map.
func (*SessionPool) Exists ¶
func (sp *SessionPool) Exists(sessId string) bool
Implement session.Store interface. Test the session with the sessId exists in map.
func (*SessionPool) Persist ¶
func (sp *SessionPool) Persist(sess *session.Session) error
Implement session.Persister interface. Store the session sess in map.
type SingleSession ¶
type SingleSession struct { sync.RWMutex // The default context to supply the created session with. Will be initialized with context.Background() // if not set. Context context.Context // The default session identifier. The new random identifier will be generated when session is created // if the identifier is empty. Id string // The user instance the session contains. User *session.User // The state instance the session contains. State interface{} // Session event bus. EventBus event.Bus // contains filtered or unexported fields }
SingleSessions supports only one session (single user approach). The session uses sync.RWMutex as data races protection and it is recommended to use the mutex embedded when accessing fields of the session.