MCPcopy
hub / github.com/psviderski/uncloud / Server

Struct Server

internal/machine/docker/server.go:57–72  ·  view source on GitHub ↗

Server implements the gRPC Docker service that proxies requests to the Docker daemon.

Source from the content-addressed store, hash-verified

55
56// Server implements the gRPC Docker service that proxies requests to the Docker daemon.
57type 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
74type ServerOptions struct {
75 // TODO: verify if we still need the network readiness checks as the cluster controller ensures the network

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected