Skip to content

Commit fd68113

Browse files
committed
WIP
1 parent fa840a6 commit fd68113

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

pkg/monitor-hw/cmd/prom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func startExporter(ruleGetter redfish.RuleGetter, client redfish.Client) error {
2727

2828
well.Go(func(ctx context.Context) error {
2929
for {
30-
client.Login(ctx)
30+
client.RecreateSession(ctx)
3131
collector.Update(ctx)
3232
select {
3333
case <-time.After(time.Duration(opts.interval) * time.Second):

redfish/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const namespace = "hw"
1616
type Client interface {
1717
Traverse(ctx context.Context, rule *CollectRule) Collected
1818
GetVersion(ctx context.Context) (string, error)
19-
Login(ctx context.Context) error
19+
RecreateSession(ctx context.Context) error
2020
CheckSession(ctx context.Context) error
2121
}
2222

redfish/mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (c *mockClient) GetVersion(ctx context.Context) (string, error) {
117117
return "1.0.0", nil
118118
}
119119

120-
func (c *mockClient) Login(ctx context.Context) error {
120+
func (c *mockClient) RecreateSession(ctx context.Context) error {
121121
return nil
122122
}
123123

redfish/redfish.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ type sessionLoginResponse struct {
204204
Id string `json:"Id"`
205205
}
206206

207-
func (c *redfishClient) Login(ctx context.Context) error {
207+
func (c *redfishClient) RecreateSession(ctx context.Context) error {
208208
if c.CheckSession(ctx) == nil {
209209
return nil
210210
}

redfish/stub_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c *stubClient) GetVersion(ctx context.Context) (string, error) {
9090
return "1.0.0", nil
9191
}
9292

93-
func (c *stubClient) Login(ctx context.Context) error {
93+
func (c *stubClient) RecreateSession(ctx context.Context) error {
9494
return nil
9595
}
9696

0 commit comments

Comments
 (0)