Documentation ¶
Index ¶
- func LogService(svc service.Service, logger log.Logger) service.Service
- type LoggedService
- func (s *LoggedService) AddRecord(ctx context.Context, r *store.Record) error
- func (s *LoggedService) AddRecords(ctx context.Context, rs ...*store.Record) error
- func (s *LoggedService) AnswerDNS(r *store.Record, m *dnsr.Msg)
- func (s *LoggedService) DNSHealth() *health.DNSReport
- func (s *LoggedService) DeleteRecord(ctx context.Context, r *store.Record) error
- func (s *LoggedService) GetRecordByAddress(ctx context.Context, address string) ([]*store.Record, error)
- func (s *LoggedService) GetRecordByTypeAndDomain(ctx context.Context, rtype, domain string) (*store.Record, error)
- func (s *LoggedService) HTTPHealth() *health.HTTPReport
- func (s *LoggedService) Health() *health.Report
- func (s *LoggedService) ListRecords(ctx context.Context) ([]*store.Record, error)
- func (s *LoggedService) StoreHealth() *health.StoreReport
- func (s *LoggedService) UpdateRecord(ctx context.Context, domain string, r *store.Record) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoggedService ¶
type LoggedService struct {
// contains filtered or unexported fields
}
LoggedService will wrap a service.Service with a logger and register the incoming events, as well as their outcome
func (*LoggedService) AddRecords ¶
AddRecords uses the store.Repository to create a set of DNS Records
func (*LoggedService) AnswerDNS ¶
func (s *LoggedService) AnswerDNS(r *store.Record, m *dnsr.Msg)
AnswerDNS uses the dns.Repository to reply to the dns.Msg `m` with the answer in store.Record `r`
func (*LoggedService) DNSHealth ¶
func (s *LoggedService) DNSHealth() *health.DNSReport
DNSHealth uses the health.Repository to generate a health.DNSReport
func (*LoggedService) DeleteRecord ¶
DeleteRecord uses the store.Repository to remove the store.Record based on input `r`
func (*LoggedService) GetRecordByAddress ¶
func (s *LoggedService) GetRecordByAddress(ctx context.Context, address string) ([]*store.Record, error)
GetRecordByDomain uses the store.Repository to return the DNS Records associated with the IP address found in store.Record `r`
func (*LoggedService) GetRecordByTypeAndDomain ¶
func (s *LoggedService) GetRecordByTypeAndDomain(ctx context.Context, rtype, domain string) (*store.Record, error)
GetRecordByDomain uses the store.Repository to return the DNS Record associated with the domain name and record type found in store.Record `r`
func (*LoggedService) HTTPHealth ¶
func (s *LoggedService) HTTPHealth() *health.HTTPReport
HTTPHealth uses the health.Repository to generate a health.HTTPReport
func (*LoggedService) Health ¶
func (s *LoggedService) Health() *health.Report
Health uses the health.Repository to generate a health.Report
func (*LoggedService) ListRecords ¶
ListRecord uses the store.Repository to return all DNS Records
func (*LoggedService) StoreHealth ¶
func (s *LoggedService) StoreHealth() *health.StoreReport
StoreHealth uses the health.Repository to generate a health.StoreReport
func (*LoggedService) UpdateRecord ¶
UpdateRecord uses the store.Repository to update the record with domain name `domain`, based on the data provided in store.Record `r`