mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-07 13:49:02 +00:00
refactor: simplify and speed up plan output formatting by removing name resolver dependency
This commit is contained in:
1 parent
95f80a7fda
commit
e4cb71b878
13 files changed
+96
-150
No files matched your search
@@ -12,8 +12,7 @@ type Operation interface {
|
||||
// Execute performs the operation using the provided client.
|
||||
Execute(ctx context.Context, cli Client) error
|
||||
// Format returns a human-readable representation of the operation.
|
||||
// TODO: get rid of the resolver and assign the required names for formatting in the operation itself.
|
||||
Format(resolver NameResolver) string
|
||||
Format() string
|
||||
String() string
|
||||
}
|
||||
|
||||
@@ -22,9 +21,3 @@ type Client interface {
|
||||
api.ContainerClient
|
||||
api.VolumeClient
|
||||
}
|
||||
|
||||
// NameResolver resolves machine and container IDs to their names.
|
||||
type NameResolver interface {
|
||||
MachineName(machineID string) string
|
||||
ContainerName(containerID string) string
|
||||
}
|
||||
Reference in new issue
Block a user