buildgrid.server.peer module

class buildgrid.server.peer.Peer(uid, token=None, tool_name=None, tool_version=None)

Bases: object

Represents a client during a session.

classmethod register_peer(uid, context, token=None)

Registers a new peer from a given context.

  • uid (str) – a unique identifier

  • token (str) – an authentication token (optional)

  • context (grpc.ServicerContext) – context in which the peer is being registered


an existing or newly created Peer object

Return type


classmethod find_peer(uid)
property uid
property token
classmethod deregister_peer(peer_uid)

Deregisters a Peer from the list of peers present. If the Peer deregistered has a single instance, we delete it from the dictionary.