| | | 1 | | using dotnet_etcd.interfaces; |
| | | 2 | | using Etcdserverpb; |
| | | 3 | | using Grpc.Core; |
| | | 4 | | using V3Electionpb; |
| | | 5 | | using V3Lockpb; |
| | | 6 | | |
| | | 7 | | namespace dotnet_etcd.multiplexer; |
| | | 8 | | |
| | | 9 | | internal sealed class Connection : IConnection |
| | | 10 | | { |
| | | 11 | | private readonly CallInvoker _callInvoker; |
| | | 12 | | |
| | | 13 | | private Auth.AuthClient _authClient; |
| | | 14 | | |
| | | 15 | | private Cluster.ClusterClient _clusterClient; |
| | | 16 | | |
| | | 17 | | private Election.ElectionClient _electionClient; |
| | | 18 | | |
| | | 19 | | private KV.KVClient _kvClient; |
| | | 20 | | |
| | | 21 | | private Lease.LeaseClient _leaseClient; |
| | | 22 | | |
| | | 23 | | private Lock.LockClient _lockClient; |
| | | 24 | | |
| | | 25 | | private Maintenance.MaintenanceClient _maintenanceClient; |
| | | 26 | | |
| | | 27 | | private Watch.WatchClient _watchClient; |
| | | 28 | | |
| | 126 | 29 | | internal Connection(CallInvoker callInvoker) => _callInvoker = callInvoker; |
| | | 30 | | |
| | 10 | 31 | | internal KV.KVClient KVClient => _kvClient ??= new KV.KVClient(_callInvoker); |
| | | 32 | | |
| | 0 | 33 | | internal Watch.WatchClient WatchClient => _watchClient ??= new Watch.WatchClient(_callInvoker); |
| | | 34 | | |
| | 6 | 35 | | internal Lease.LeaseClient LeaseClient => _leaseClient ??= new Lease.LeaseClient(_callInvoker); |
| | | 36 | | |
| | 4 | 37 | | internal Lock.LockClient LockClient => _lockClient ??= new Lock.LockClient(_callInvoker); |
| | | 38 | | |
| | 0 | 39 | | internal Cluster.ClusterClient ClusterClient => _clusterClient ??= new Cluster.ClusterClient(_callInvoker); |
| | | 40 | | |
| | | 41 | | internal Maintenance.MaintenanceClient MaintenanceClient => |
| | 10 | 42 | | _maintenanceClient ??= new Maintenance.MaintenanceClient(_callInvoker); |
| | | 43 | | |
| | 13 | 44 | | internal Auth.AuthClient AuthClient => _authClient ??= new Auth.AuthClient(_callInvoker); |
| | | 45 | | |
| | 10 | 46 | | internal Election.ElectionClient ElectionClient => _electionClient ??= new Election.ElectionClient(_callInvoker); |
| | | 47 | | |
| | 10 | 48 | | KV.KVClient IConnection.KVClient => KVClient; |
| | | 49 | | |
| | 0 | 50 | | Watch.WatchClient IConnection.WatchClient => WatchClient; |
| | | 51 | | |
| | 6 | 52 | | Lease.LeaseClient IConnection.LeaseClient => LeaseClient; |
| | | 53 | | |
| | 4 | 54 | | Lock.LockClient IConnection.LockClient => LockClient; |
| | | 55 | | |
| | 0 | 56 | | Cluster.ClusterClient IConnection.ClusterClient => ClusterClient; |
| | | 57 | | |
| | 10 | 58 | | Maintenance.MaintenanceClient IConnection.MaintenanceClient => MaintenanceClient; |
| | | 59 | | |
| | 13 | 60 | | Auth.AuthClient IConnection.AuthClient => AuthClient; |
| | | 61 | | |
| | 10 | 62 | | Election.ElectionClient IConnection.ElectionClient => ElectionClient; |
| | | 63 | | } |