Documentation ¶
Index ¶
- type VPanelConfig
- type VPanelFunc
- type VPanelInfo
- type VPanels
- func (vp *VPanels) Call() error
- func (vp *VPanels) Count() int
- func (vp *VPanels) GetInfo(idx int) *VPanelInfo
- func (vp *VPanels) GetInfoList() []*VPanelInfo
- func (vp *VPanels) GetPanelNames() []string
- func (vp *VPanels) IndexByName(name string) int
- func (vp *VPanels) NameByIndex(idx int) string
- func (vp *VPanels) Register(panelName string, panelIndex int, panelFunc VPanelFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VPanelConfig ¶
type VPanelConfig struct { Name string // Name of the panel Panels *kview.Panels // Primary panel App *kview.Application // Application or top level application }
VPanelConfig is a struct that contains configuration information for a VPanel.
type VPanelFunc ¶
type VPanelFunc func(cfg VPanelConfig) (*VPanelInfo, error)
VPanelFunc is a function type that represents a function that creates a new VPanelData instance. This function is used to define the behavior of each individual panel in the VPanels system.
The function takes a single parameter: - cfg (VPanelConfig): A struct containing configuration information for the panel.
The function returns two values: - *VPanelData: A pointer to a VPanelData instance representing the newly created panel. - error: An error value that will be nil if the panel creation is successful, or an error if it fails.
type VPanelInfo ¶
type VPanels ¶
type VPanels struct {
// contains filtered or unexported fields
}
VPanels is a primary structure that represents the VPanels system.
func GetVPanels ¶
func GetVPanels() *VPanels
func Initialize ¶
func Initialize(panels *kview.Panels, app *kview.Application) *VPanels
Initialize is a function that initializes the global VPanels instance. It uses a sync.Once to ensure that the initialization is performed only once, even if multiple goroutines call initVPanels concurrently.
func (*VPanels) GetInfo ¶
func (vp *VPanels) GetInfo(idx int) *VPanelInfo
func (*VPanels) GetInfoList ¶
func (vp *VPanels) GetInfoList() []*VPanelInfo