Server API
Implementation of server for ellclockin.
-
class ellclockin.server.Server(config)[source]
Bases: RpcBroker
Elldev server that is also a SHV Broker.
- Parameters:
config (ServerConfig)
-
class Client(client, broker, *args, **kwargs)[source]
Bases: Client
The client exposed in Broker.
- Parameters:
-
-
class LoginClient(*args, **kwargs)[source]
Bases: Client
, LoginClient
Broker’s client that expects login from client.
- Parameters:
-
-
APP_NAME: str = 'clockin-broker'
Name reported as application name for pyshvbroker.
-
class ConnectClient(*args, role, **kwargs)[source]
Bases: Client
, ConnectClient
Broker client that activelly connects to some other peer.
- Parameters:
args (Any)
role (RpcBrokerRoleABC)
kwargs (Any)
-
APP_NAME: str = 'clockin-broker-client'
Name reported as application name for pyshvbroker connection.
-
class ellclockin.server.ServerConfig(port=3755, users=<factory>, dbfile=PosixPath('ellclockin.db'))[source]
Bases: object
Elldev server config.
- Parameters:
-
-
port: int = 3755
TCP/IP port where server will be listening.
-
users: dict[str, str]
Mapping of user name to their passwords.
-
dbfile: Path = PosixPath('ellclockin.db')
-
shvbroker_config()[source]
Provide new SHV Broker config based on this configuration.
- Return type:
RpcBrokerConfig
-
classmethod load(path)[source]
Load configuration file.
- Parameters:
path (Path)
- Return type:
ServerConfig