Server implements the gRPC Docker service that proxies requests to the Docker daemon.
| 55 | |
| 56 | // Server implements the gRPC Docker service that proxies requests to the Docker daemon. |
| 57 | type Server struct { |
| 58 | pb.UnimplementedDockerServer |
| 59 | client *client.Client |
| 60 | service *Service |
| 61 | db *sqlx.DB |
| 62 | // internalDNSIP is a function that returns the IP address of the internal DNS server. It may return an empty |
| 63 | // address if the address is unknown (e.g. when the machine is not initialised yet). |
| 64 | internalDNSIP func() netip.Addr |
| 65 | // machineID is a function that returns the machine ID. It may return an empty string if the machine |
| 66 | // is not initialised yet. |
| 67 | machineID func() string |
| 68 | // networkReady is a function that returns true if the Docker network is ready for containers. |
| 69 | networkReady func() bool |
| 70 | // waitForNetworkReady is a function that waits for the Docker network to be ready for containers. |
| 71 | waitForNetworkReady func(ctx context.Context) error |
| 72 | } |
| 73 | |
| 74 | type ServerOptions struct { |
| 75 | // TODO: verify if we still need the network readiness checks as the cluster controller ensures the network |
nothing calls this directly
no outgoing calls
no test coverage detected