...

Source file src/github.com/redhat-developer/odo/pkg/state/interface.go

Documentation: github.com/redhat-developer/odo/pkg/state

     1  package state
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/redhat-developer/odo/pkg/api"
     7  )
     8  
     9  type Client interface {
    10  	// Init creates a devstate file for the process
    11  	Init(ctx context.Context) error
    12  
    13  	// SetForwardedPorts sets the forwarded ports in the state file and saves it to the file, updating the metadata
    14  	SetForwardedPorts(ctx context.Context, fwPorts []api.ForwardedPort) error
    15  
    16  	// GetForwardedPorts returns the ports forwarded by the current odo dev session
    17  	GetForwardedPorts(ctx context.Context) ([]api.ForwardedPort, error)
    18  
    19  	// SaveExit resets the state file to indicate odo is not running
    20  	SaveExit(ctx context.Context) error
    21  
    22  	// SetAPIServerPort sets the port where API server is listening in the state file and saves it to the file, updating the metadata
    23  	SetAPIServerPort(ctx context.Context, port int) error
    24  
    25  	// GetAPIServerPorts returns the port where the API servers are listening, possibly per platform.
    26  	GetAPIServerPorts(ctx context.Context) ([]api.DevControlPlane, error)
    27  
    28  	GetOrphanFiles(ctx context.Context) ([]string, error)
    29  }
    30  

View as plain text