generated from multiversx/mx-chain-ws-connector-template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.go
39 lines (32 loc) · 987 Bytes
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package process
import (
"io"
"github.com/multiversx/mx-chain-core-go/core"
"github.com/multiversx/mx-chain-core-go/data/block"
)
// WSConnector defines a ws connector that receives incoming data and can be closed
type WSConnector interface {
Close() error
}
// DataProcessor defines a payload processor for incoming ws data
type DataProcessor interface {
ProcessPayload(payload []byte, topic string, version uint32) error
Close() error
IsInterfaceNil() bool
}
// Logger defines the behavior of a data logger component
type Logger interface {
Info(message string, args ...interface{})
IsInterfaceNil() bool
}
// BlockContainerHandler defines a block creator container
type BlockContainerHandler interface {
Add(headerType core.HeaderType, creator block.EmptyBlockCreator) error
Get(headerType core.HeaderType) (block.EmptyBlockCreator, error)
IsInterfaceNil() bool
}
// Writer defines a handler for the Write method
type Writer interface {
io.Writer
Close() error
}