writeInfo method

Future<void> writeInfo({
  1. required int start,
  2. required Map<String, Object?> client,
  3. required Map<String, Object?> admin,
  4. Map<String, Object?>? agent,
})

Writes service.json: PID, start, protocol, the endpoints (the ssh-agent's agent {socket} or {pipe} when it runs); no secret.

Implementation

Future<void> writeInfo({
  required int start,
  required Map<String, Object?> client,
  required Map<String, Object?> admin,
  Map<String, Object?>? agent,
}) => _writeFile(
  infoFile,
  jsonEncode({
    'pid': pid,
    'start': start,
    'protocol': 1,
    'client': client,
    'admin': admin,
    'agent': ?agent,
  }),
);