Documentation
¶
Overview ¶
Package connection owns the active session and drives an engine.Engine
Index ¶
- type Service
- func (s *Service) ActiveID() (string, error)
- func (s *Service) Connect(id string) (Status, error)
- func (s *Service) Disconnect() (Status, error)
- func (s *Service) ForgetIfRemoved(subID string, nodes []domain.Node)
- func (s *Service) Nodes() ([]rpc.Node, error)
- func (s *Service) Probe(sub, id string) ([]rpc.Node, error)
- func (s *Service) RefreshEvery() int
- func (s *Service) Restore()
- func (s *Service) SetSettings(in domain.Settings) (Status, error)
- func (s *Service) SetTun(enable bool) (Status, error)
- func (s *Service) Settings() domain.Settings
- func (s *Service) Shutdown()
- func (s *Service) Status() Status
- func (s *Service) Watch() (initial Status, ch <-chan Status, cancel func())
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ActiveID ¶
ActiveID returns the connected node id, or the last one used, or "" if none.
func (*Service) Disconnect ¶
func (*Service) ForgetIfRemoved ¶
ForgetIfRemoved drops the active node when its subscription is deleted.
func (*Service) Probe ¶
Probe pings one node if id is set, else every node in sub, else all of them.
func (*Service) RefreshEvery ¶
RefreshEvery is the subscription refresh interval in hours, 0 when off.
Click to show internal directories.
Click to hide internal directories.