package desktop
import "github.com/docker/compose/v2/internal/desktop"
Index ¶
- type Client
- func NewClient(apiEndpoint string) *Client
- func NewFromDockerClient(ctx context.Context, dockerCli command.Cli) (*Client, error)
- func (c *Client) Close() error
- func (c *Client) Endpoint() string
- func (c *Client) FeatureFlags(ctx context.Context) (FeatureFlagResponse, error)
- func (c *Client) Ping(ctx context.Context) (*PingResponse, error)
- type FeatureFlagResponse
- type FeatureFlagValue
- type PingResponse
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for integration with Docker Desktop features.
func NewClient ¶
NewClient creates a Desktop integration client for the provided in-memory socket address (AF_UNIX or named pipe).
func NewFromDockerClient ¶
NewFromDockerClient creates a Desktop Client using the Docker CLI client to auto-discover the Desktop CLI socket endpoint (if available).
An error is returned if there is a failure communicating with Docker Desktop, but even on success, a nil Client can be returned if the active Docker Engine is not a Desktop instance.
func (*Client) Close ¶
Close releases any open connections.
func (*Client) Endpoint ¶
func (*Client) FeatureFlags ¶
func (c *Client) FeatureFlags(ctx context.Context) (FeatureFlagResponse, error)
func (*Client) Ping ¶
func (c *Client) Ping(ctx context.Context) (*PingResponse, error)
Ping is a minimal API used to ensure that the server is available.
type FeatureFlagResponse ¶
type FeatureFlagResponse map[string]FeatureFlagValue
type FeatureFlagValue ¶
type FeatureFlagValue struct { Enabled bool `json:"enabled"` }
type PingResponse ¶
type PingResponse struct { ServerTime int64 `json:"serverTime"` }
Source Files ¶
- Version
- v2.36.1
- Published
- May 19, 2025
- Platform
- js/wasm
- Imports
- 12 packages
- Last checked
- 2 hours ago –
Tools for package owners.