redfish

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRCRedfishClient

type IRCRedfishClient struct {
	RedfishClient
}

func (*IRCRedfishClient) GetSysInfo

func (i *IRCRedfishClient) GetSysInfo() (hostname, sku, model, fwver, fqdn, imgid string, err error)

func (*IRCRedfishClient) GetSystemId

func (i *IRCRedfishClient) GetSystemId() (string, error)

type RedfishClient

type RedfishClient struct {
	Hostname    string
	Username    string
	Password    string
	BearerToken string
	HttpClient  *http.Client
	IsIPv6      int
	FwVer       string
}

func InitBearer

func InitBearer(hostname string, token string) (*RedfishClient, error)

func (*RedfishClient) GetEventsSSE

func (r *RedfishClient) GetEventsSSE(Ctx context.Context, event chan<- *RedfishEvent, sseURI string) error

func (*RedfishClient) GetHostname

func (r *RedfishClient) GetHostname() string

func (*RedfishClient) GetInventoryByUri

func (r *RedfishClient) GetInventoryByUri(sseURI string) (*RedfishPayload, error)

func (*RedfishClient) GetLceSSE

func (r *RedfishClient) GetLceSSE(Ctx context.Context, event chan<- *RedfishEvent, sseURI string) error

func (*RedfishClient) GetPassword

func (r *RedfishClient) GetPassword() string

func (*RedfishClient) GetSSEByUri

func (r *RedfishClient) GetSSEByUri(event chan<- *RedfishEvent, sseURI string)

func (*RedfishClient) GetSysInfo

func (r *RedfishClient) GetSysInfo() (hostname, sku, model, fwver, fqdn, imgid string, err error)

func (*RedfishClient) GetSystemId

func (r *RedfishClient) GetSystemId() (string, error)

func (*RedfishClient) GetUri

func (r *RedfishClient) GetUri(uri string) (*RedfishPayload, error)

func (*RedfishClient) GetUsername

func (r *RedfishClient) GetUsername() string

func (*RedfishClient) ListenForAlerts

func (r *RedfishClient) ListenForAlerts(Ctx context.Context, event chan<- *RedfishEvent)

func (*RedfishClient) ListenForLceEvents

func (r *RedfishClient) ListenForLceEvents(Ctx context.Context, event chan<- *RedfishEvent)

func (*RedfishClient) ListenForMetricReports

func (r *RedfishClient) ListenForMetricReports(Ctx context.Context, event chan<- *RedfishEvent)

func (*RedfishClient) SetFwVer

func (r *RedfishClient) SetFwVer(ver string)

func (*RedfishClient) StartSSE

func (r *RedfishClient) StartSSE(Ctx context.Context, event chan<- *RedfishEvent, sseURI string) error

func (*RedfishClient) Walk

func (r *RedfishClient) Walk() map[string]*RedfishPayload

type RedfishClientInterface

type RedfishClientInterface interface {
	GetEventsSSE(Ctx context.Context, event chan<- *RedfishEvent, sseURI string) error
	GetInventoryByUri(sseURI string) (*RedfishPayload, error)
	GetLceSSE(Ctx context.Context, event chan<- *RedfishEvent, sseURI string) error
	GetSSEByUri(event chan<- *RedfishEvent, sseURI string)
	GetSysInfo() (hostname string, sku string, model string, fwver string, fqdn string, imgid string, err error)
	GetSystemId() (string, error)
	GetUri(uri string) (*RedfishPayload, error)
	ListenForAlerts(Ctx context.Context, event chan<- *RedfishEvent)
	ListenForLceEvents(Ctx context.Context, event chan<- *RedfishEvent)
	ListenForMetricReports(Ctx context.Context, event chan<- *RedfishEvent)
	StartSSE(Ctx context.Context, event chan<- *RedfishEvent, sseURI string) error
	Walk() map[string]*RedfishPayload

	GetHostname() string
	SetFwVer(ver string)
	GetUsername() string
	GetPassword() string
	// contains filtered or unexported methods
}

func Init

func Init(hostname string, username string, password string, serviceType int) (RedfishClientInterface, error)

type RedfishEvent

type RedfishEvent struct {
	Err     error
	ID      string
	Payload *RedfishPayload
}

type RedfishPayload

type RedfishPayload struct {
	Object map[string]interface{}
	Array  []interface{}
	Float  float64
	Client *RedfishClient
}

func (*RedfishPayload) GetArraySize

func (r *RedfishPayload) GetArraySize() int

func (*RedfishPayload) GetCollectionSize

func (r *RedfishPayload) GetCollectionSize() int

func (*RedfishPayload) GetEventByIndex

func (r *RedfishPayload) GetEventByIndex(index int) (*RedfishPayload, error)

func (*RedfishPayload) GetEventSize

func (r *RedfishPayload) GetEventSize() int

func (*RedfishPayload) GetPropertyByIndex

func (r *RedfishPayload) GetPropertyByIndex(index int) (*RedfishPayload, error)

func (*RedfishPayload) GetPropertyByName

func (r *RedfishPayload) GetPropertyByName(name string) (*RedfishPayload, error)

func (*RedfishPayload) IsArray

func (r *RedfishPayload) IsArray() bool

func (*RedfishPayload) IsCollection

func (r *RedfishPayload) IsCollection() bool

func (*RedfishPayload) IsEventCollection

func (r *RedfishPayload) IsEventCollection() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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