-
Notifications
You must be signed in to change notification settings - Fork 676
[WIP]: Create a Plugin System for Lima #3573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
unsuman
wants to merge
49
commits into
lima-vm:master
Choose a base branch
from
unsuman:feature/driver-plugin-system
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
f30235a
driver(internal): use existing driver.Driver as plugin interface
unsuman c9d0f99
driver(internal): registry init
unsuman fda3db4
refactor(BaseDriver): remove driver.BaseDriver from Lima level
unsuman bf9d0cb
refactor(BaseDriver): remove driver.BaseDriver from driver(qemu) level
unsuman 91814ea
refactor(BaseDriver): remove driver.BaseDriver from driver(vz) level
unsuman c1a08a1
refactor(BaseDriver): remove driver.BaseDriver from driver(wsl2) level
unsuman 57a2080
refactor(BaseDriver): make drivers implement the driver.Driver interface
unsuman 82955c1
driver(internal): divide the driver.Driver interface and define some …
unsuman b1f6a2a
driver(internal): change lima to support internal drivers
unsuman 96e6a2a
driver(internal): add blank imports and make changes to Lima for inte…
unsuman f02c49b
driver(internal): add register files and make drivers compatible for …
unsuman 535a080
driver(internal): list available built-in drivers
unsuman bb413ed
driver(internal): fix CI checks and lint errors
unsuman 457ddea
refactor(driver): move qemu,vz and wsl2 to pkg/driver
unsuman 13840ac
driver(internal): refactor Snapshot to SnapshotManager in driver inte…
unsuman dd276d3
driver(internal): compile vz on darwin, wsl2 on windows only and impl…
unsuman a20c982
refactor(driver): remove redundant builtins pkg
unsuman c56295c
driver(external): proto file init
unsuman 439802d
driver(external): external driver manager init
unsuman 252c024
driver(external): complete proto file for driver interface
unsuman 9a9387a
driver(external): finalise proto file and generate gRPC code
unsuman 0f46872
driver(external): implement server defination
unsuman 5979bf3
driver(external): implement the grpc client and server
unsuman 637e2b6
driver(external): remove error from the grpc response payload
unsuman e01f06d
driver(external): add discovery of external drivers
unsuman fbf9753
driver(internal): consolidate some functions to single GetInfo() func…
unsuman f01df5e
driver(external): consolidate some functions to single GetInfo() rpc …
unsuman 9b22819
driver(external): implement Start() & SetConfig() as server methods
unsuman e2e0fd7
driver(external): complete client grpc implementation and one server …
unsuman 43a1305
driver(external): tweak some external driver manager code
unsuman 6d652e0
driver(external): complete external driver manager and registering pr…
unsuman 0e0c207
driver(external): some tweaks around server and client code
unsuman e324e7b
driver(external): server logs to a file and fixed json marshal error …
unsuman 62754a4
driver(external): implement bidirectional streaming for GuestAgentConn()
unsuman 9abdd10
driver(external): manage external driver lifecycle
unsuman eefabda
driver(external): revamp grpchijack and GuestAgentConn()
unsuman a4d2fcd
driver(external): fix a nil pointer deref
unsuman cc54d5c
driver(external): create driver logs in instance directory
unsuman aab0162
driver(external): proxy vsock to ga.sock for vz
unsuman d13a7de
driver(external): change grpc transport to unix sockets
unsuman cd92ddb
driver(external): resolve GuestAgentConn() issue by proxying via new …
unsuman b690b21
driver(external): move proxy conn code to driver level
unsuman ebbfcbd
driver(external): clean code and fix driver discovery in libexec
unsuman 963f97c
driver(external): tweak some code and move the conenction proxy to se…
unsuman f2cd7f0
driver(registry): prioritize internal drivers
unsuman c8b4113
driver(build): update Makefile to build drivers as internal or external
unsuman 53e7cd1
driver(registry): avoid parenthesized info while listing drivers
unsuman bcb71ca
refactor(image-downloader): move code to limactl from vz & qemu
unsuman ca8867e
driver(build): limactl should not depend on additional-drivers target
unsuman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-FileCopyrightText: Copyright The Lima Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/lima-vm/lima/pkg/driver/external/server" | ||
"github.com/lima-vm/lima/pkg/driver/qemu" | ||
) | ||
|
||
// To be used as an external driver for Lima. | ||
func main() { | ||
server.Serve(qemu.New()) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//go:build darwin | ||
|
||
// SPDX-FileCopyrightText: Copyright The Lima Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/lima-vm/lima/pkg/driver/external/server" | ||
"github.com/lima-vm/lima/pkg/driver/vz" | ||
) | ||
|
||
// To be used as an external driver for Lima. | ||
func main() { | ||
server.Serve(vz.New()) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//go:build windows | ||
|
||
// SPDX-FileCopyrightText: Copyright The Lima Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/lima-vm/lima/pkg/driver/external/server" | ||
"github.com/lima-vm/lima/pkg/driver/wsl2" | ||
) | ||
|
||
// To be used as an external driver for Lima. | ||
func main() { | ||
server.Serve(wsl2.New()) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//go:build !external_vz | ||
|
||
// SPDX-FileCopyrightText: Copyright The Lima Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
// Import vz driver to register it in the registry on darwin. | ||
import _ "github.com/lima-vm/lima/pkg/driver/vz" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//go:build !external_qemu | ||
|
||
// SPDX-FileCopyrightText: Copyright The Lima Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
// Import qemu driver to register it in the registry on all platforms. | ||
import _ "github.com/lima-vm/lima/pkg/driver/qemu" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//go:build !external_wsl2 | ||
|
||
// SPDX-FileCopyrightText: Copyright The Lima Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
// Import wsl2 driver to register it in the registry on windows. | ||
import _ "github.com/lima-vm/lima/pkg/driver/wsl2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: