Documentation
¶
Index ¶
- Constants
- Variables
- func NewTokenizer(src string) *tokenizer
- type Record
- func (this *Record) AppendIP(ips ...net.IP) error
- func (this *Record) AppendTXT(value string) error
- func (this *Record) Expired() bool
- func (this *Record) Host() string
- func (this *Record) IP4() []net.IP
- func (this *Record) IP6() []net.IP
- func (this *Record) Key() string
- func (this *Record) Name() string
- func (this *Record) Port() uint
- func (this *Record) Service() string
- func (this *Record) SetAddr(addr string) error
- func (this *Record) SetName(name string) error
- func (this *Record) SetPTR(zone string, rr *dns.PTR) error
- func (this *Record) SetSRV(rr *dns.SRV) error
- func (this *Record) SetService(service, subtype string) error
- func (this *Record) SetTTL(d time.Duration) error
- func (this *Record) SetTXT(txt []string) error
- func (this *Record) Source() rpc.DiscoveryType
- func (s *Record) String() string
- func (this *Record) Subtype() string
- func (this *Record) TTL() time.Duration
- func (this *Record) Text() []string
- func (this *Record) Timestamp() time.Time
- type Util
Constants ¶
View Source
const (
EOF rune = -(iota + 1)
)
Variables ¶
View Source
var (
ErrParseError = errors.New("Parse Error")
)
Functions ¶
func NewTokenizer ¶
func NewTokenizer(src string) *tokenizer
Types ¶
type Record ¶
type Record struct { Key_ string `json:"key"` Name_ string `json:"name"` Host_ string `json:"host"` Service_ string `json:"service"` Port_ uint `json:"port,omitempty"` Txt_ []string `json:"txt,omitempty"` Ipv4_ []net.IP `json:"ipv4,omitempty"` Ipv6_ []net.IP `json:"ipv6,omitempty"` Ts_ *timestamp `json:"ts,omitempty"` Ttl_ *duration `json:"ttl,omitempty"` Source_ rpc.DiscoveryType `json:"source,omitempty"` }
Record implements a gopi.RPCServiceRecord
func (*Record) Service ¶
Service returns the service type and protocol, including the underscores but removes the subtype information
func (*Record) SetService ¶
Set service type, subtype and IP protocol
func (*Record) Source ¶
func (this *Record) Source() rpc.DiscoveryType
Source returns the source of the record
Click to show internal directories.
Click to hide internal directories.