1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

68 Commits

Author SHA1 Message Date
Stéphane Graber
4f1443bc81 client: Implement IdenticalCertificate
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-09-25 19:39:40 -04:00
Stéphane Graber
a83e437873 client: Add configurable temp directory
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-07-31 19:23:09 -04:00
Stéphane Graber
2d08ba86f1 client: Add SkipGetEvents
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Sponsored-by: https://webdock.io
2025-07-31 18:41:10 -04:00
Stéphane Graber
54e7c21734 client: Make golangci-lint clean
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-04-02 19:43:11 -04:00
Stéphane Graber
547f98e68f client: Fix gofumpt
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-03-17 18:00:32 -04:00
Stéphane Graber
b5280ed636 client: Add basic OCI registry client
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-07-11 11:21:18 -04:00
Neal Gompa
d8b78d5007 client/connection: Add support for the socket existing in /run/incus
Transient sockets are supposed to be in /run rather than /var, so make
it possible to detect that automatically when used.

Signed-off-by: Neal Gompa <neal@gompa.dev>
2024-05-03 23:12:41 -04:00
Stéphane Graber
09dc3e60bc global: Update Go package to v6
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-05 11:11:11 -04:00
Stéphane Graber
c1f4ae9094 shared/cliconfig: Bump zitadel/oidc to v3
Closes #673

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-03-26 20:43:16 -04:00
Thomas Hipp
16095c9721 Replace util.ValueInSlice with slices.Contains
Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
2024-02-23 22:28:37 +01:00
Mark Laing
7cd2924a7d [lxd-import] client: Replaces 'oidc' string with constant.
Signed-off-by: Mark Laing <mark.laing@canonical.com>
2023-10-25 14:19:21 -04:00
Stéphane Graber
268946ee49 client: Add incus-user support
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-10-06 22:07:14 -04:00
Stéphane Graber
5c7eb43e40 client: Eliminate use of shared package
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-09-28 04:33:40 -04:00
Thomas Hipp
72d9c88e3d Replace shared.StringInSlice with shared.ValueInSlice
Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
2023-09-26 20:39:20 +02:00
Stéphane Graber
7fee381b6b client: Remove all references to LXD
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-08-14 16:13:06 -04:00
Thomas Hipp
a373a04e2c client: Remove Candid authentication
Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
2023-08-12 21:55:42 +02:00
Stéphane Graber
13867bffd0 client: Update for lxc/incus
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-08-08 23:35:46 -04:00
Stéphane Graber
300167aff2 client: Remove snap handling
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-08-04 14:50:35 -04:00
Stéphane Graber
1ff59816a2 client: Update env variables
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2023-08-03 01:46:21 -04:00
Aleksa Sarai
ab0295afdd global: update go import paths to github.com/cyphar/incus
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2023-08-01 07:27:12 +10:00
Aleksa Sarai
7673a78986 global: rename all paths from lxd to incus or inc
This does not include a rename of the go package path, this will be
updated in a later commit.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2023-08-01 07:25:29 +10:00
Thomas Parrott
fa0571c4cc client: Rename imports to new go module
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2023-07-04 21:51:08 +01:00
Thomas Hipp
d5416329e3 client: Add support for OIDC
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2023-04-13 16:47:33 -04:00
Thomas Parrott
70d7064c4b client/connection: Add URL to debug logging in ConnectLXDWithContext
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2023-03-21 14:19:37 +00:00
Sebastiao Pamplona
4a6d84e30c client: fix cast to http.Transport when using TransportWrapper
Signed-off-by: Sebastiao Pamplona <sebastiaodsrp@gmail.com>
2023-01-30 20:41:33 -05:00
Sebastiao Pamplona
89529781a4 client: add TransportWrapper to ConnectionArgs
Signed-off-by: Sebastiao Pamplona <sebastiaodsrp@gmail.com>
2023-01-29 21:00:22 +00:00
Stéphane Graber
661bfbafda client: Move to current bakery version
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-12-16 00:45:13 -05:00
Thomas Parrott
ced72a9a6f client/connection: Don't use logger.Debugf
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2022-12-02 08:38:36 +00:00
Max Asnaashari
f6ce1df328 client/util: Use ConnectionArgs.Proxy with unix socket client
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
2022-11-04 07:35:59 +00:00
Stéphane Graber
bd64cc8a02 client: Move to bakery.v3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-07-05 16:16:08 -04:00
Mark Laing
f5a7263648 client: Inserts newlines after blocks.
Signed-off-by: Mark Laing <mark.laing@canonical.com>
2022-06-29 09:56:22 +01:00
Mark Laing
10b7695c59 client: End all function comments with a full-stop.
Signed-off-by: Mark Laing <mark.laing@canonical.com>
2022-06-28 10:22:04 +01:00
Stéphane Graber
69e7537c8a global: Switch to logger.Ctx
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-03-31 04:09:05 -04:00
Thomas Parrott
ddb9d83dd1 client: Replaces r.httpHost with r.httpBaseURL from net/url package
The old name was misleading as it didn't represent a host name, but rather a URL.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2022-03-14 10:39:46 +00:00
Thomas Parrott
2a9532ef7a client: Replace chConnected with ctxConnected
Fixes a crash when Disconnect() is called multiple times.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2022-02-16 20:58:00 +00:00
whywaita
31d34b703a client: Add context-aware connection functions
Signed-off-by: whywaita <whywaita@whywrite.it>
2022-01-16 04:42:30 +09:00
Thomas Parrott
1cc00b62d5 client/connection: Initialise eventListeners and eventConns
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2022-01-05 16:11:59 +00:00
Stéphane Graber
e5aa1c6f82 client: Update imports for log15
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-01-04 17:30:05 -05:00
Thomas Parrott
8cdce8bfa9 client/connection: Typo in ConnectLXD
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2021-10-19 15:55:04 +01:00
Thomas Parrott
dad8a898ea client/connection: Error quoting in ConnectSimpleStreams
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2021-07-22 14:19:55 +01:00
Thomas Parrott
a731d98447 client/connection: Log simplestreams URL in ConnectSimpleStreams
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2021-07-22 14:19:39 +01:00
Thomas Parrott
fa9a42a818 client/connection: Correct HTTPs to HTTPS in ConnectPublicLXD
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2021-04-30 09:49:46 +01:00
Stéphane Graber
af09a3f77d client: Fix ConnectLXDUnix regression
For some reason some logic actively relies on unixPath being empty if it was
provided that way by the user.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-07 22:49:41 -04:00
Stéphane Graber
0c606c0710 client: Expand snap path in ConnectLXDUnix
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2020-06-06 22:36:54 -04:00
Stéphane Graber
36c4b9530c client: Setup caching for simplestreams
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-12-10 19:52:48 -05:00
Stéphane Graber
6c476f0b89 client: Add caching options
This will allow moving the current caching logic from the lxd code into
the shared client package.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-12-10 17:17:03 -05:00
Stéphane Graber
b32ac8fbf3 client: Add Disconnect function
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-11-12 10:27:06 -08:00
Thomas Parrott
fc6577e847 client/connection: Simplifies ConnectLXDHTTP
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2019-11-08 22:52:08 +00:00
Thomas Hipp
3d89d0e526 client: Add ConnectLXDHTTP function
This add the ConnectLXDHTTP function which takes an additional HTTP
client argument. It will be used for future LXD agent communication.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2019-11-08 17:02:41 +01:00
Stéphane Graber
eaa18e6ef3 client: Rename ContainerServer to InstanceServer
And same to associated structs, alias old names.

Moving forward we will be using the new names in our own code and the
new Instance related functions will be using new versions of the various
argument structs.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-09-13 02:58:01 +02:00