Skip to content

Commit 6d45c75

Browse files
committed
notifications: Fix import after IGL import
1 parent 2097b04 commit 6d45c75

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

notifications/plugin/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"errors"
77
"fmt"
88
"github.com/icinga/icinga-go-library/notifications/event"
9+
"github.com/icinga/icinga-go-library/notifications/rpc"
910
"github.com/icinga/icinga-go-library/types"
1011
"github.com/icinga/icinga-go-library/utils"
11-
"github.com/icinga/icinga-notifications/pkg/rpc"
1212
"io"
1313
"log"
1414
"os"

notifications/rpc/rpc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ import (
99
"sync"
1010
)
1111

12+
// Request is the internal JSON RPC request representation.
1213
type Request struct {
1314
Method string `json:"method"`
1415
Params json.RawMessage `json:"params"`
1516
Id uint64 `json:"id"`
1617
}
1718

19+
// Response is the internal JSON RPC response representation.
1820
type Response struct {
1921
Result json.RawMessage `json:"result,omitempty"`
2022
Error string `json:"error,omitempty"`
2123
Id uint64 `json:"id"`
2224
}
2325

26+
// Error is a custom error type, to be returned by RPC.Call.
2427
type Error struct {
2528
cause error
2629
}
@@ -33,6 +36,9 @@ func (err *Error) Unwrap() error {
3336
return err.cause
3437
}
3538

39+
// RPC is a JSON RPC client.
40+
//
41+
// It is either used internally in Icinga Notifications or within the plugin.RunPlugin method.
3642
type RPC struct {
3743
writer io.Closer // use encoder for writing instead
3844
encoder *json.Encoder

0 commit comments

Comments
 (0)