MCPcopy Index your code
hub / github.com/ddserver/ddserver / receiver

Function receiver

ddserver/recursor/__main__.py:79–100  ·  view source on GitHub ↗

Receive and process messages from PowerDNS

(logger)

Source from the content-addressed store, hash-verified

77
78@require(logger='ddserver.utils.logger:Logger')
79def receiver(logger):
80 """ Receive and process messages from PowerDNS
81 """
82
83 while True:
84 # Read a line
85 line = sys.stdin.readline()
86 if not line:
87 break
88
89 # Lex the line
90 message = lexer(line)
91
92 # Check if we got a message
93 if message is None:
94 logger.error('recursor: Unknown tag: %s', line)
95 continue
96
97 logger.debug('recursor: Received message: %s', message)
98
99 # Forward the message
100 yield message
101
102
103@require(logger='ddserver.utils.logger:Logger')

Callers 1

mainFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected