mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Use devstate.PID.json * odo describe component gets forwarded ports from devstate.json * Pass pid in context * Add platform to state * Overwrite devstate.json if PId not exists * odo describe component displays forwarded ports from podman/cluster * Start only one session on platform * Fix integration test * Review * Fix * Update pkg/state/errors.go Co-authored-by: Armel Soro <armel@rm3l.org> * Integration tests * Fix integration test --------- Co-authored-by: Armel Soro <armel@rm3l.org>
20 lines
433 B
Go
20 lines
433 B
Go
package state
|
|
|
|
import "fmt"
|
|
|
|
type ErrAlreadyRunningOnPlatform struct {
|
|
platform string
|
|
pid int
|
|
}
|
|
|
|
func NewErrAlreadyRunningOnPlatform(platform string, pid int) ErrAlreadyRunningOnPlatform {
|
|
return ErrAlreadyRunningOnPlatform{
|
|
platform: platform,
|
|
pid: pid,
|
|
}
|
|
}
|
|
|
|
func (e ErrAlreadyRunningOnPlatform) Error() string {
|
|
return fmt.Sprintf("a session with PID %d is already running on platform %q", e.pid, e.platform)
|
|
}
|