logger

package
v0.0.0-...-6e12e1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogService

func LogService(svc service.Service, logger log.Logger) service.Service

LogService will return a LoggedService in the form of a service.Service, by wraping an input service.Service `svc` with log.Logger `logger`

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) AddRecord

func (s *LoggedService) AddRecord(ctx context.Context, r *store.Record) error

AddRecord uses the store.Repository to create a DNS Record

func (*LoggedService) AddRecords

func (s *LoggedService) AddRecords(ctx context.Context, rs ...*store.Record) error

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

func (s *LoggedService) DeleteRecord(ctx context.Context, r *store.Record) error

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

func (s *LoggedService) ListRecords(ctx context.Context) ([]*store.Record, error)

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

func (s *LoggedService) UpdateRecord(ctx context.Context, domain string, r *store.Record) error

UpdateRecord uses the store.Repository to update the record with domain name `domain`, based on the data provided in store.Record `r`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL