forked from TrueCloudLab/frostfs-node
Initial commit
Initial public review release v0.10.0
This commit is contained in:
commit
dadfd90dcd
276 changed files with 46331 additions and 0 deletions
22
lib/blockchain/event/handler.go
Normal file
22
lib/blockchain/event/handler.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package event
|
||||
|
||||
// Handler is an Event processing function.
|
||||
type Handler func(Event)
|
||||
|
||||
// HandlerInfo is a structure that groups
|
||||
// the parameters of the handler of particular
|
||||
// contract event.
|
||||
type HandlerInfo struct {
|
||||
scriptHashWithType
|
||||
|
||||
h Handler
|
||||
}
|
||||
|
||||
// SetHandler is an event handler setter.
|
||||
func (s *HandlerInfo) SetHandler(v Handler) {
|
||||
s.h = v
|
||||
}
|
||||
|
||||
func (s HandlerInfo) handler() Handler {
|
||||
return s.h
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue