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) AddApiSessionRemovedListener(token string, callBack func(token string)) RemoveListener
- func (sm *StateManagerImpl) AddConnectedApiSession(token string, removeCB func(), ch channel2.Channel)
- func (sm *StateManagerImpl) AddSession(ns *edge_ctrl_pb.Session)
- func (sm *StateManagerImpl) AddSessionRemovedListener(token string, callBack func(token string)) RemoveListener
- func (sm *StateManagerImpl) GetApiSession(token string) *edge_ctrl_pb.ApiSession
- func (sm *StateManagerImpl) GetApiSessionByFingerprint(fingerprint string) chan *edge_ctrl_pb.ApiSession
- func (sm *StateManagerImpl) GetSession(token string) *edge_ctrl_pb.Session
- func (sm *StateManagerImpl) GetSessionWithTimeout(token string, timeout time.Duration) *edge_ctrl_pb.Session
- func (sm *StateManagerImpl) RemoveApiSession(token string)
- func (sm *StateManagerImpl) RemoveConnectedApiSession(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, intervalSeconds int)
- 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 { //"Network" Sessions GetSession(token string) *edge_ctrl_pb.Session GetSessionWithTimeout(token string, timeout time.Duration) *edge_ctrl_pb.Session AddSession(ns *edge_ctrl_pb.Session) UpdateSession(ns *edge_ctrl_pb.Session) RemoveSession(token string) RemoveMissingSessions(knownSessions []*edge_ctrl_pb.Session) AddSessionRemovedListener(token string, callBack func(token string)) RemoveListener //ApiSessions GetApiSession(token string) *edge_ctrl_pb.ApiSession GetApiSessionByFingerprint(fingerprint string) chan *edge_ctrl_pb.ApiSession AddApiSession(ns *edge_ctrl_pb.ApiSession) UpdateApiSession(ns *edge_ctrl_pb.ApiSession) RemoveApiSession(token string) RemoveMissingApiSessions(knownSessions []*edge_ctrl_pb.ApiSession) AddConnectedApiSession(token string, removeCB func(), ch channel2.Channel) RemoveConnectedApiSession(token string, underlay channel2.Channel) AddApiSessionRemovedListener(token string, callBack func(token string)) RemoveListener StartHeartbeat(channel channel2.Channel, seconds int) }
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) AddApiSessionRemovedListener ¶ added in v0.17.30
func (sm *StateManagerImpl) AddApiSessionRemovedListener(token string, callBack func(token string)) RemoveListener
func (*StateManagerImpl) AddConnectedApiSession ¶ added in v0.17.30
func (sm *StateManagerImpl) AddConnectedApiSession(token string, removeCB func(), ch channel2.Channel)
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) GetApiSession ¶ added in v0.17.30
func (sm *StateManagerImpl) GetApiSession(token string) *edge_ctrl_pb.ApiSession
func (*StateManagerImpl) GetApiSessionByFingerprint ¶ added in v0.17.30
func (sm *StateManagerImpl) GetApiSessionByFingerprint(fingerprint string) chan *edge_ctrl_pb.ApiSession
func (*StateManagerImpl) GetSession ¶
func (sm *StateManagerImpl) GetSession(token string) *edge_ctrl_pb.Session
func (*StateManagerImpl) GetSessionWithTimeout ¶ added in v0.17.30
func (sm *StateManagerImpl) GetSessionWithTimeout(token string, timeout time.Duration) *edge_ctrl_pb.Session
func (*StateManagerImpl) RemoveApiSession ¶
func (sm *StateManagerImpl) RemoveApiSession(token string)
func (*StateManagerImpl) RemoveConnectedApiSession ¶ added in v0.17.30
func (sm *StateManagerImpl) RemoveConnectedApiSession(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, intervalSeconds int)
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.