Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (this *Config) CreatePath(path string) error
- func (this *Config) Destroy() error
- func (this *Config) EnumerateServices(source rpc.DiscoveryType) []string
- func (this *Config) ExpireTask(start chan<- event.Signal, stop <-chan event.Signal) error
- func (this *Config) GetServices(service string, source rpc.DiscoveryType) []rpc.ServiceRecord
- func (this *Config) IndexForService(service rpc.ServiceRecord) int
- func (this *Config) Init(config Discovery, source gopi.Driver, errors chan<- error) error
- func (this *Config) Read(path string) error
- func (this *Config) Register(service rpc.ServiceRecord) error
- func (this *Config) Remove(service rpc.ServiceRecord) error
- func (this *Config) RemoveAtIndex(index int) error
- func (this *Config) SetModified()
- func (this Config) String() string
- func (this *Config) UnexpiredServices(records []rpc.ServiceRecord) []rpc.ServiceRecord
- func (this *Config) Write(path string, indent bool) error
- func (this *Config) WriteConfigTask(start chan<- event.Signal, stop <-chan event.Signal) error
- type Discovery
- type Listener
- func (this *Listener) AnswerEnumMulticast(services []string, question Question, ttl time.Duration) error
- func (this *Listener) AnswerInstanceMulticast(instances []rpc.ServiceRecord, question Question, ttl time.Duration) error
- func (this *Listener) Destroy() error
- func (this *Listener) Init(config Discovery, errors chan<- error, services chan<- rpc.ServiceRecord, ...) error
- func (this *Listener) QueryAll(msg *dns.Msg, ctx context.Context) error
- func (this Listener) String() string
- type Question
Constants ¶
View Source
const ( FILENAME_DEFAULT = "discovery.json" WRITE_DELTA = 5 * time.Second EXPIRE_DELTA = 60 * time.Second )
View Source
const ( DELTA_PROBE = 2 * time.Minute DEFAULT_TTL = 15 * time.Minute )
View Source
const ( MDNS_DEFAULT_DOMAIN = "local." DELTA_QUERY_MS = 500 REPEAT_QUERY = 4 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { sync.Mutex event.Tasks event.Publisher // Public members Services []rpc.ServiceRecord `json:"services"` // contains filtered or unexported fields }
func (*Config) CreatePath ¶
Create path if it doesn't exist
func (*Config) EnumerateServices ¶ added in v1.0.6
func (this *Config) EnumerateServices(source rpc.DiscoveryType) []string
EnumerateServices returns the names of discovered service types and filters to those which have been registered locally (rather than through DNS service discovery) if flag is set
func (*Config) ExpireTask ¶
func (*Config) GetServices ¶ added in v1.0.6
func (this *Config) GetServices(service string, source rpc.DiscoveryType) []rpc.ServiceRecord
func (*Config) IndexForService ¶
func (this *Config) IndexForService(service rpc.ServiceRecord) int
func (*Config) RemoveAtIndex ¶
func (*Config) UnexpiredServices ¶ added in v1.0.8
func (this *Config) UnexpiredServices(records []rpc.ServiceRecord) []rpc.ServiceRecord
ExpireServices returns an array of unexpired services
type Discovery ¶
type Listener ¶
func (*Listener) AnswerEnumMulticast ¶ added in v1.0.8
func (*Listener) AnswerInstanceMulticast ¶ added in v1.0.8
Click to show internal directories.
Click to hide internal directories.