Documentation
¶
Index ¶
- type Manager
- func (m *Manager) CloseAllSessions()
- func (m *Manager) CloseSession(sessionID string)
- func (m *Manager) CreateSession(sessionID string)
- func (m *Manager) GetMessageForSend(ctx context.Context, sessionID string) ([]byte, error)
- func (m *Manager) GetSession(sessionID string) (*State, bool)
- func (m *Manager) IsEmpty() bool
- func (m *Manager) IsExistSession(sessionID string) bool
- func (m *Manager) RangeSessions(f func(sessionID string, state *State) bool)
- func (m *Manager) SendMessage(ctx context.Context, sessionID string, message []byte) error
- func (m *Manager) SetMaxIdleTime(d time.Duration)
- func (m *Manager) StartHeartbeatAndCleanInvalidSessions()
- func (m *Manager) StopHeartbeat()
- func (m *Manager) UpdateSessionLastActiveAt(sessionID string)
- type State
- func (s *State) Close()
- func (s *State) GetReady() bool
- func (s *State) GetReceivedInitRequest() bool
- func (s *State) GetReqID2respChan() cmap.ConcurrentMap[string, chan *protocol.JSONRPCResponse]
- func (s *State) GetSubscribedResources() cmap.ConcurrentMap[string, struct{}]
- func (s *State) IncRequestID() int64
- func (s *State) SetClientInfo(ClientInfo *protocol.Implementation, ...)
- func (s *State) SetReady()
- func (s *State) SetReceivedInitRequest()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CloseAllSessions ¶
func (m *Manager) CloseAllSessions()
func (*Manager) CloseSession ¶
func (*Manager) CreateSession ¶
func (*Manager) GetMessageForSend ¶
func (*Manager) IsExistSession ¶
func (*Manager) RangeSessions ¶
func (*Manager) SendMessage ¶
func (*Manager) SetMaxIdleTime ¶
func (*Manager) StartHeartbeatAndCleanInvalidSessions ¶
func (m *Manager) StartHeartbeatAndCleanInvalidSessions()
func (*Manager) StopHeartbeat ¶
func (m *Manager) StopHeartbeat()
func (*Manager) UpdateSessionLastActiveAt ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) GetReceivedInitRequest ¶
func (*State) GetReqID2respChan ¶
func (s *State) GetReqID2respChan() cmap.ConcurrentMap[string, chan *protocol.JSONRPCResponse]
func (*State) GetSubscribedResources ¶
func (s *State) GetSubscribedResources() cmap.ConcurrentMap[string, struct{}]
func (*State) IncRequestID ¶
func (*State) SetClientInfo ¶
func (s *State) SetClientInfo(ClientInfo *protocol.Implementation, ClientCapabilities *protocol.ClientCapabilities)
func (*State) SetReceivedInitRequest ¶
func (s *State) SetReceivedInitRequest()
Click to show internal directories.
Click to hide internal directories.