Documentation ¶
Index ¶
- func IsAllowedNetwork(host string, allowed []string) bool
- type Connection
- type Model
- type Service
- func (s *Service) AllAddresses() []string
- func (s *Service) CommitConfiguration(from, to config.Configuration) bool
- func (s *Service) ExternalAddresses() []string
- func (s *Service) NATType() string
- func (s *Service) Status() map[string]interface{}
- func (s *Service) VerifyConfiguration(from, to config.Configuration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAllowedNetwork ¶ added in v0.14.27
IsAllowedNetwork returns true if the given host (IP or resolvable hostname) is in the set of allowed networks (CIDR format only).
Types ¶
type Connection ¶ added in v0.13.0
type Connection interface { protocol.Connection io.Closer Type() string Transport() string RemoteAddr() net.Addr Priority() int }
Connection is what we expose to the outside. It is a protocol.Connection that can be closed and has some metadata.
type Model ¶
type Model interface { protocol.Model AddConnection(conn Connection, hello protocol.HelloResult) Connection(remoteID protocol.DeviceID) (Connection, bool) OnHello(protocol.DeviceID, net.Addr, protocol.HelloResult) error GetHello(protocol.DeviceID) protocol.HelloIntf }
type Service ¶ added in v0.13.0
type Service struct { *suture.Supervisor // contains filtered or unexported fields }
Service listens and dials all configured unconnected devices, via supported dialers. Successful connections are handed to the model.
func NewService ¶ added in v0.13.0
func (*Service) AllAddresses ¶ added in v0.13.0
func (*Service) CommitConfiguration ¶ added in v0.13.0
func (s *Service) CommitConfiguration(from, to config.Configuration) bool
func (*Service) ExternalAddresses ¶ added in v0.13.0
func (*Service) VerifyConfiguration ¶ added in v0.13.0
func (s *Service) VerifyConfiguration(from, to config.Configuration) error
Click to show internal directories.
Click to hide internal directories.