sanswitch

package
v3.0.0-rc67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sanswitch declares the drivers of the SAN switches a node inventories for the collector, as it does the storage arrays.

A switch is a "switch#<name>" section of the node or cluster configuration, whose type chooses the driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// Name is the name of the section, "switch#<name>".
	Name() string
	SetName(string)
	SetConfig(*xconfig.T)
	Config() *xconfig.T

	// Report returns the raw output of each command the configuration
	// of the switch is read from, by command name, for the collector
	// to parse.
	Report(ctx context.Context) (map[string]string, error)

	// ReportName is the name the collector knows the switch by.
	ReportName() string
}

Driver reads the configuration of a switch.

func GetDriver

func GetDriver(t string) Driver

GetDriver returns a new driver of the switch type t, or nil when no driver serves it.

type Switch

type Switch struct {
	// contains filtered or unexported fields
}

Switch holds what every driver needs from its section.

func (*Switch) Config

func (t *Switch) Config() *xconfig.T

func (*Switch) Key

func (t *Switch) Key(option string) key.T

Key returns the key of the option in the section of the switch.

func (*Switch) Name

func (t *Switch) Name() string

func (*Switch) SetConfig

func (t *Switch) SetConfig(c *xconfig.T)

func (*Switch) SetName

func (t *Switch) SetName(name string)

func (*Switch) ShortName

func (t *Switch) ShortName() string

ShortName is the name of the section without its "switch#" prefix.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL