Documentation ¶
Index ¶
- Constants
- type DisconnectCB
- type RemoveListener
- type StateManager
- type StateManagerImpl
- func (sm *StateManagerImpl) ActiveSessionTokens() []string
- func (sm *StateManagerImpl) AddApiSession(session *edge_ctrl_pb.ApiSession)
- func (sm *StateManagerImpl) AddConnectedSession(token string, removeCB func(), ch channel2.Channel)
- func (sm *StateManagerImpl) AddNetworkSessionRemovedListener(token string, callBack func(token string)) RemoveListener
- func (sm *StateManagerImpl) AddSession(ns *edge_ctrl_pb.Session)
- func (sm *StateManagerImpl) AddSessionRemovedListener(token string, callBack func(token string)) RemoveListener
- func (sm *StateManagerImpl) GetNetworkSession(token string) *edge_ctrl_pb.Session
- func (sm *StateManagerImpl) GetNetworkSessionWithTimeout(token string, timeout time.Duration) *edge_ctrl_pb.Session
- func (sm *StateManagerImpl) GetSession(token string) chan *edge_ctrl_pb.ApiSession
- func (sm *StateManagerImpl) GetSessionByFingerprint(fingerprint string) chan *edge_ctrl_pb.ApiSession
- func (sm *StateManagerImpl) RemoveApiSession(token string)
- func (sm *StateManagerImpl) RemoveConnectedSession(token string, ch channel2.Channel)
- func (sm *StateManagerImpl) RemoveMissingApiSessions(knownSessions []*edge_ctrl_pb.ApiSession)
- func (sm *StateManagerImpl) RemoveMissingSessions(knownSessions []*edge_ctrl_pb.Session)
- func (sm *StateManagerImpl) RemoveSession(token string)
- func (sm *StateManagerImpl) StartHeartbeat(ctrl channel2.Channel)
- func (sm *StateManagerImpl) UpdateApiSession(session *edge_ctrl_pb.ApiSession)
- func (sm *StateManagerImpl) UpdateSession(ns *edge_ctrl_pb.Session)
- type TokenProvider
Constants ¶
View Source
const ( EventAddedNetworkSession = "AddedNetworkSession" EventUpdatedNetworkSession = "UpdatedNetworkSession" EventRemovedNetworkSession = "RemovedNetworkSession" EventAddedSession = "AddedSession" EventUpdatedSession = "UpdatedSession" EventRemovedSession = "RemovedSession" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisconnectCB ¶
type DisconnectCB func(token string)
type RemoveListener ¶
type RemoveListener func()
type StateManager ¶
type StateManager interface { AddSession(ns *edge_ctrl_pb.Session) UpdateSession(ns *edge_ctrl_pb.Session) RemoveSession(token string) RemoveMissingSessions(knownSessions []*edge_ctrl_pb.Session) AddApiSession(ns *edge_ctrl_pb.ApiSession) UpdateApiSession(ns *edge_ctrl_pb.ApiSession) RemoveApiSession(token string) RemoveMissingApiSessions(knownSessions []*edge_ctrl_pb.ApiSession) GetNetworkSession(token string) *edge_ctrl_pb.Session GetNetworkSessionWithTimeout(token string, timeout time.Duration) *edge_ctrl_pb.Session GetSessionByFingerprint(fingerprint string) chan *edge_ctrl_pb.ApiSession GetSession(token string) chan *edge_ctrl_pb.ApiSession AddNetworkSessionRemovedListener(token string, callBack func(token string)) RemoveListener AddSessionRemovedListener(token string, callBack func(token string)) RemoveListener StartHeartbeat(channel channel2.Channel) AddConnectedSession(token string, removeCB func(), ch channel2.Channel) RemoveConnectedSession(token string, underlay channel2.Channel) }
func GetStateManager ¶
func GetStateManager() StateManager
type StateManagerImpl ¶
type StateManagerImpl struct { Hostname string ControllerAddr string ClusterId string NodeId string events.EventEmmiter // contains filtered or unexported fields }
func (*StateManagerImpl) ActiveSessionTokens ¶
func (sm *StateManagerImpl) ActiveSessionTokens() []string
func (*StateManagerImpl) AddApiSession ¶
func (sm *StateManagerImpl) AddApiSession(session *edge_ctrl_pb.ApiSession)
func (*StateManagerImpl) AddConnectedSession ¶
func (sm *StateManagerImpl) AddConnectedSession(token string, removeCB func(), ch channel2.Channel)
func (*StateManagerImpl) AddNetworkSessionRemovedListener ¶
func (sm *StateManagerImpl) AddNetworkSessionRemovedListener(token string, callBack func(token string)) RemoveListener
func (*StateManagerImpl) AddSession ¶
func (sm *StateManagerImpl) AddSession(ns *edge_ctrl_pb.Session)
func (*StateManagerImpl) AddSessionRemovedListener ¶
func (sm *StateManagerImpl) AddSessionRemovedListener(token string, callBack func(token string)) RemoveListener
func (*StateManagerImpl) GetNetworkSession ¶
func (sm *StateManagerImpl) GetNetworkSession(token string) *edge_ctrl_pb.Session
func (*StateManagerImpl) GetNetworkSessionWithTimeout ¶
func (sm *StateManagerImpl) GetNetworkSessionWithTimeout(token string, timeout time.Duration) *edge_ctrl_pb.Session
func (*StateManagerImpl) GetSession ¶
func (sm *StateManagerImpl) GetSession(token string) chan *edge_ctrl_pb.ApiSession
func (*StateManagerImpl) GetSessionByFingerprint ¶
func (sm *StateManagerImpl) GetSessionByFingerprint(fingerprint string) chan *edge_ctrl_pb.ApiSession
func (*StateManagerImpl) RemoveApiSession ¶
func (sm *StateManagerImpl) RemoveApiSession(token string)
func (*StateManagerImpl) RemoveConnectedSession ¶
func (sm *StateManagerImpl) RemoveConnectedSession(token string, ch channel2.Channel)
func (*StateManagerImpl) RemoveMissingApiSessions ¶
func (sm *StateManagerImpl) RemoveMissingApiSessions(knownSessions []*edge_ctrl_pb.ApiSession)
func (*StateManagerImpl) RemoveMissingSessions ¶
func (sm *StateManagerImpl) RemoveMissingSessions(knownSessions []*edge_ctrl_pb.Session)
func (*StateManagerImpl) RemoveSession ¶
func (sm *StateManagerImpl) RemoveSession(token string)
func (*StateManagerImpl) StartHeartbeat ¶
func (sm *StateManagerImpl) StartHeartbeat(ctrl channel2.Channel)
func (*StateManagerImpl) UpdateApiSession ¶
func (sm *StateManagerImpl) UpdateApiSession(session *edge_ctrl_pb.ApiSession)
func (*StateManagerImpl) UpdateSession ¶
func (sm *StateManagerImpl) UpdateSession(ns *edge_ctrl_pb.Session)
type TokenProvider ¶
type TokenProvider interface {
ActiveSessionTokens() []string
}
Click to show internal directories.
Click to hide internal directories.