mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* refactor: Set the experimental mode env var in a single place for the '--api-server' related tests * Add integration tests highlighting the expectations * Make the state client return the API server ports per platform 'odo dev' might be running on both cluster and podman, so we might end up with several API servers. * Make 'odo describe component' return information about the API Server and web UI This is viewable only when running 'odo describe component' with the experimental mode enabled. * fixup! refactor: Set the experimental mode env var in a single place for the '--api-server' related tests * Unit-test describe#filterByPlatform logic * Simplify logic for 'describe#filterByPlatform', as suggested in review Co-authored-by: Philippe Martin <phmartin@redhat.com> --------- Co-authored-by: Philippe Martin <phmartin@redhat.com>
28 lines
992 B
Go
28 lines
992 B
Go
package state
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/redhat-developer/odo/pkg/api"
|
|
)
|
|
|
|
type Client interface {
|
|
// Init creates a devstate file for the process
|
|
Init(ctx context.Context) error
|
|
|
|
// SetForwardedPorts sets the forwarded ports in the state file and saves it to the file, updating the metadata
|
|
SetForwardedPorts(ctx context.Context, fwPorts []api.ForwardedPort) error
|
|
|
|
// GetForwardedPorts returns the ports forwarded by the current odo dev session
|
|
GetForwardedPorts(ctx context.Context) ([]api.ForwardedPort, error)
|
|
|
|
// SaveExit resets the state file to indicate odo is not running
|
|
SaveExit(ctx context.Context) error
|
|
|
|
// SetAPIServerPort sets the port where API server is listening in the state file and saves it to the file, updating the metadata
|
|
SetAPIServerPort(ctx context.Context, port int) error
|
|
|
|
// GetAPIServerPorts returns the port where the API servers are listening, possibly per platform.
|
|
GetAPIServerPorts(ctx context.Context) ([]api.DevControlPlane, error)
|
|
}
|