Ejemplo n.º 1
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.TOMBSTONE
     ref.id = self.id
     for netloc in self.location_hints:
         ref.location_hints.add(netloc_to_protobuf(netloc))
     return ref
Ejemplo n.º 2
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.ERROR
     ref.id = self.id
     ref.reason = self.reason
     ref.details = self.details
     return ref
Ejemplo n.º 3
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.CONCRETE
     ref.size_hint = self.size_hint
     for netloc in self.location_hints:
         ref.location_hints.add(netloc_to_protobuf(netloc))
     return ref
Ejemplo n.º 4
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.TOMBSTONE
     ref.id = self.id
     for netloc in self.location_hints:
         ref.location_hints.add(netloc_to_protobuf(netloc))
     return ref
Ejemplo n.º 5
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.CONCRETE
     ref.size_hint = self.size_hint
     for netloc in self.location_hints:
         ref.location_hints.add(netloc_to_protobuf(netloc))
     return ref
Ejemplo n.º 6
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.ERROR
     ref.id = self.id
     ref.reason = self.reason
     ref.details = self.details
     return ref
Ejemplo n.º 7
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.FUTURE
     ref.id = self.id
     return ref
Ejemplo n.º 8
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.VALUE
     ref.id = self.id
     ref.value = self.value
     return ref
Ejemplo n.º 9
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.FETCH
     ref.id = self.id
     ref.url = self.url
     return ref
Ejemplo n.º 10
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.FIXED
     ref.id = self.id
     ref.location_hints.add(netloc_to_protobuf(self.fixed_netloc))
     return ref
Ejemplo n.º 11
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.FUTURE
     ref.id = self.id
     return ref
Ejemplo n.º 12
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.VALUE
     ref.id = self.id
     ref.value = self.value
     return ref
Ejemplo n.º 13
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.FETCH
     ref.id = self.id
     ref.url = self.url
     return ref
Ejemplo n.º 14
0
 def as_protobuf(self):
     ref = Reference()
     ref.type = Reference.FIXED
     ref.id = self.id
     ref.location_hints.add(netloc_to_protobuf(self.fixed_netloc))
     return ref