add service inspect command, introduce squirrel for sql query building

This commit is contained in:
Pavel Sviderski
2024-12-03 10:56:29 +10:00
parent 21d55dc69a
commit daada3bbe9
12 changed files with 205 additions and 65 deletions
+4 -2
View File
@@ -9,6 +9,8 @@ import (
"uncloud/internal/machine/docker"
)
var NotFound = errors.New("not found")
// Client is a client for the machine API.
type Client struct {
connector Connector
@@ -46,6 +48,6 @@ func New(ctx context.Context, connector Connector) (*Client, error) {
return c, nil
}
func (c *Client) Close() error {
return errors.Join(c.conn.Close(), c.connector.Close())
func (cli *Client) Close() error {
return errors.Join(cli.conn.Close(), cli.connector.Close())
}